Send SMS, MMS, Voice, or WhatsApp messages through Salami Gateway.
Send a message through a specific SMS App.
POST /api/sms/apps/{sms_app}/send
Requires Bearer token.
| Parameter | Type | Description |
|---|---|---|
sms_app |
integer | SMS App ID |
{
"to": "254712345678",
"message": "Hello! Your order #1234 has been confirmed."
}
| Parameter | Type | Required | Description |
|---|---|---|---|
to |
string | Yes | Recipient phone number |
message |
string | Yes | Message body (max 500 characters) |
{
"data": {
"id": 156,
"to": "254712345678",
"from": "+15551234567",
"message": "Hello! Your order #1234 has been confirmed.",
"sms_provider": "Twilio",
"provider_id": "SM1234567890abcdef",
"status": "pending",
"folder": "outbox",
"channel": "sms",
"message_parts": 1,
"cost": null,
"app_id": 1,
"created_at": "2026-03-15T14:30:00.000000Z",
"updated_at": "2026-03-15T14:30:00.000000Z"
}
}
| Code | Description |
|---|---|
200 |
Message queued successfully |
401 |
Unauthenticated |
404 |
SMS App not found |
422 |
Validation error (missing to or message, or message exceeds 500 chars) |
500 |
Provider error |
| Field | Rule |
|---|---|
to |
Required |
message |
Required, max 500 characters |
Send a message through an SMS App Group with automatic load balancing.
POST /api/sms/groups/{group}/send
Requires Bearer token.
| Parameter | Type | Description |
|---|---|---|
group |
integer | SMS App Group ID |
{
"to": "254712345678",
"message": "Your verification code is 4829."
}
| Parameter | Type | Required | Description |
|---|---|---|---|
to |
string | Yes | Recipient phone number |
message |
string | Yes | Message body (max 500 characters) |
{
"data": {
"id": 157,
"to": "254712345678",
"from": "+254700123456",
"message": "Your verification code is 4829.",
"sms_provider": "AfricasTalking",
"status": "pending",
"folder": "outbox",
"channel": "sms",
"message_parts": 1,
"app_id": 3,
"created_at": "2026-03-15T14:31:00.000000Z"
}
}
sms_limit - pending_count (minimum 0).| Code | Description |
|---|---|
200 |
Message queued |
401 |
Unauthenticated |
404 |
Group not found or group has no apps |
422 |
Validation error |
Messages are not sent synchronously. When you call the send endpoint:
Message record is created with status: pending and folder: outbox.sent when the provider accepts it.delivered or failed.Retrieve paginated outbound messages for an app.
GET /api/sms/apps/{sms_app}/outbox
Requires Bearer token.
| Parameter | Type | Description |
|---|---|---|
sms_app |
integer | SMS App ID |
{
"data": [
{
"id": 1,
"name": "My Twilio App",
"type": "Twilio"
},
{
"current_page": 1,
"data": [
{
"id": 156,
"to": "254712345678",
"from": "+15551234567",
"message": "Hello! Your order #1234 has been confirmed.",
"sms_provider": "Twilio",
"provider_id": "SM1234567890abcdef",
"status": "delivered",
"folder": "outbox",
"channel": "sms",
"message_parts": 1,
"cost": "0.0075",
"delivery_date": "2026-03-15T14:30:05.000000Z",
"app_id": 1,
"created_at": "2026-03-15T14:30:00.000000Z"
}
],
"per_page": 15,
"total": 1
}
]
}
| Code | Description |
|---|---|
200 |
Success |
401 |
Unauthenticated |
404 |
App not found |
Retrieve paginated inbound messages for an app.
GET /api/sms/apps/{sms_app}/inbox
Requires Bearer token.
| Parameter | Type | Description |
|---|---|---|
sms_app |
integer | SMS App ID |
{
"data": [
{
"id": 1,
"name": "My Twilio App",
"type": "Twilio"
},
{
"current_page": 1,
"data": [
{
"id": 200,
"to": "+15551234567",
"from": "254712345678",
"message": "CONFIRM",
"sms_provider": "Twilio",
"status": "delivered",
"folder": "inbox",
"channel": "sms",
"message_time": "2026-03-15T15:00:00.000000Z",
"app_id": 1,
"created_at": "2026-03-15T15:00:00.000000Z"
}
],
"per_page": 15,
"total": 1
}
]
}
Retrieve a specific message by ID.
GET /api/sms/sms/{smsId}
Requires Bearer token.
| Parameter | Type | Description |
|---|---|---|
smsId |
integer | Message ID |
{
"data": {
"id": 156,
"to": "254712345678",
"from": "+15551234567",
"message": "Hello! Your order #1234 has been confirmed.",
"sms_provider": "Twilio",
"provider_id": "SM1234567890abcdef",
"message_time": "2026-03-15T14:30:00.000000Z",
"telco_code": "63902",
"telco_name": "Safaricom",
"message_parts": 1,
"retry_count": 0,
"status": "delivered",
"delivery_date": "2026-03-15T14:30:05.000000Z",
"cost": "0.0075",
"folder": "outbox",
"channel": "sms",
"app_id": 1,
"created_at": "2026-03-15T14:30:00.000000Z",
"updated_at": "2026-03-15T14:30:05.000000Z"
}
}
| Code | Description |
|---|---|
200 |
Success |
401 |
Unauthenticated |
404 |
Message not found |
Retrieve call records for a voice-enabled SMS App.
GET /api/sms/apps/{sms_app}/calls
Requires Bearer token.
{
"data": {
"current_page": 1,
"data": [
{
"id": 1,
"from": "254712345678",
"to": "+15551234567",
"duration": 45,
"status": "completed",
"app_id": 5,
"created_at": "2026-03-15T16:00:00.000000Z"
}
],
"per_page": 15,
"total": 1
}
}
Message cost is determined by the provider and recorded after the message is processed. Cost is stored in the cost field of the message record and is populated when the provider returns pricing information or when a DLR with cost data is received.
For multi-part messages (messages exceeding 160 characters for GSM-7 or 70 characters for UCS-2), the message_parts field indicates how many segments were sent.
Phone numbers should be provided in international format without the + prefix for most providers:
| Format | Example |
|---|---|
| Kenya | 254712345678 |
| Nigeria | 2348012345678 |
| US/Canada | 12025551234 |
Some providers accept the + prefix. Consult the specific provider's documentation.