Karibu Messages API Documentation
The Karibu Messages API allows developers to send instant and campaign-based messages, retrieve message logs, and access message history for authenticated users or specific recipients. This API is designed for seamless integration into applications requiring messaging capabilities.Authentication
All API endpoints require anX-API-Key
header for authentication.
Header | Type | Required | Description |
---|---|---|---|
X-API-Key | string | Yes | Your API key. |
Endpoints Overview
The Karibu Messages API supports the following endpoints:Endpoint | Method | Description |
---|---|---|
/v1/message/send-instant | POST | Sends an instant message to one or multiple recipients. |
/v1/message/send-campaign | POST | Sends a message to all contacts in a campaign. |
/v1/message/logs | GET | Fetches all message logs for the authenticated user. |
/v1/message/history | GET | Retrieves all messages sent by the authenticated user. |
/v1/message/history/recipient/{recipient} | GET | Retrieves all messages sent to a specific recipient. |
/v1/message/message-log/{message_id} | GET | Retrieves details of a specific message. |
1. Send Instant Message
Send an instant message to one or multiple recipients.Endpoint
Request Body
Field | Type | Required | Description |
---|---|---|---|
content | string | Yes | Message content. |
recipients | array of strings | Yes | List of recipient phone numbers (e.g., 255788344348 ). |
sender_id | string | Yes | Sender ID for the message. |
campaign_id | string or null | No | Campaign ID associated with the message. |
groups | array of strings or null | No | List of group IDs for recipients. |
Request Example
Response Example
Error Response (422)
2. Send Campaign Message
Send a message to all contacts in a specified campaign.Endpoint
Request Body
Field | Type | Required | Default | Description |
---|---|---|---|---|
campaign_id | string | Yes | — | Campaign ID for the message. |
group_id | string | Yes | — | Group ID for the campaign recipients. |
content | string | Yes | — | Message content. |
sender_id | string | Yes | — | Sender ID (2–13 characters). |
start_date | string or null | No | "2025-08-23T02:22:43.202062" | When sending starts (ISO 8601 format). |
end_date | string or null | No | — | When sending ends (ISO 8601 format). |
frequency | string or null | No | "once" | Campaign frequency (e.g., once ). |
Request Example
Response Example
Error Response (422)
3. Get Message Logs
Fetch all message logs for the authenticated user.Endpoint
Response Example
Error Response (422)
4. Get User Messages
Retrieve all messages sent by the authenticated user.Endpoint
Response Example
Error Response (422)
5. Get Messages By Recipient
Retrieve all messages sent to a specific recipient.Endpoint
Path Parameters
Field | Type | Required | Description |
---|---|---|---|
recipient | string | Yes | Recipient phone number. |
Response Example
Error Response (422)
6. Get Message Detail
Retrieve details of a specific message by its ID.Endpoint
Path Parameters
Field | Type | Required | Description |
---|---|---|---|
message_id | string | Yes | Unique message ID. |