API Documentation

Base URL: https://www.smsreminder.2ri.cc/api

Authentication: Use Authorization: Bearer YOUR_API_TOKEN in request headers.
Get your token from your Profile page.
Authentication
POST /api/register

Register a new user account.

{
  "name": "John Doe",
  "phone": "233XXXXXXXXX",
  "password": "secret"
}
POST /api/login

Get JWT token for authenticated requests.

{
  "phone": "233XXXXXXXXX",
  "password": "secret"
}

Response: { "token": "eyJ...", "user": {...} }

OTP Verification
POST /api/send-otp

Send a 6-digit OTP to a phone number.

{ "phone": "233XXXXXXXXX" }
POST /api/verify-otp

Verify OTP code. Valid for 5 minutes.

{ "phone": "233XXXXXXXXX", "code": "123456" }
Contacts (JWT required)
GET /api/contacts

List all contacts.

POST /api/contacts

Create a new contact.

{ "phone": "233XXXXXXXXX", "group_ids": [1, 2] }
GET /api/contacts/{id}

Get single contact details.

PUT /api/contacts/{id}

Update a contact.

DELETE /api/contacts/{id}

Delete a contact.

POST /api/contacts/groups

Create a contact group.

{ "name": "Friends" }
GET /api/contacts/groups

List all groups.

POST /api/contacts/groups/{id}/remind

Send reminder to entire group.

POST /api/contacts/fields

Manage custom fields.

Reminders (JWT required except guest)
GET /api/reminders

List all reminders.

POST /api/reminders

Create a reminder.

{
  "contact_id": 1,
  "title": "Rent Due",
  "message_template": "Hello {{name}}, rent is due on {{event_date}}",
  "event_date": "2026-06-01 09:00:00",
  "triggers": [
    {"type": "exact"},
    {"type": "before", "offset_value": 1, "offset_unit": "weeks"}
  ],
  "reminder_type_id": 1,
  "sender_id": 2,
  "otp_code": "123456"
}
GET /api/reminders/{id}

Get single reminder.

PUT /api/reminders/{id}

Update a reminder.

DELETE /api/reminders/{id}

Delete a reminder.

POST /api/reminders/guest

Create guest reminder (no auth, paid via Paystack).

{ "contact_phone": "233XXX", "title": "...", "message_template": "...", "event_date": "...", "triggers": [...] }
POST /api/reminders/bulk

Bulk create reminders (requires permitted user + OTP).

{ "phones": ["233XXX", "233YYY"], "title": "...", "message_template": "...", "event_date": "...", "triggers": [...] }
POST /api/reminders/{id}/toggle

Toggle reminder status (active/paused).

Wallet & Payments (JWT required)
GET /api/wallet

Get wallet balance and details.

POST /api/paystack/init

Initiate Paystack payment.

{ "amount": 10 }
POST /api/paystack/verify

Verify Paystack payment.

GET /api/paystack/callback

Paystack callback URL (auto-handled).

POST /api/paystack/webhook

Paystack webhook endpoint.

Sender IDs & Bulk Campaign
GET /api/sender-ids/{typeId}

Get available sender IDs for a reminder type. Filter by country.

GET /api/sender-ids/1?country_code=GH&user_id=5
GET /api/message-templates/{senderId}

Get message templates for a sender ID.

POST /api/bulk-campaign

Submit bulk SMS campaign (guest, admin-reviewed).

{
  "title": "Newsletter",
  "message": "Hello from SMS Reminder!",
  "phones": ["233XXX", "233YYY"],
  "reminder_type_id": 1,
  "sender_id": 2,
  "email": "user@email.com",
  "reference": "paystack_ref",
  "amount": 0.50
}
Message Templates
GET /api/message-templates/{senderId}

Get active message templates for a sender ID.

GET /api/message-templates/1

Returns: [{"id":1,"name":"Welcome","content":"Hello {{name}}!"}]

Need help? Contact support or check your Profile for your API token.