Download OpenAPI specification:Download
SMS Gateway API describes how to send transacional and bulk SMS via various telecom providers.
To receive messages through our platform, you will be required to provide a URL to be configured for your shortcode to which we shall forward messages.
Request is sent via POST with following parameters encoded by JSON:
Field name | Type | Required | Example | Note |
---|---|---|---|---|
dest | string | yes | 8888 | destination phone number |
phone | string | yes | 00909989 | originator phone number |
message | string | yes | PLAY | message sent by originator |
{
"dest":"8888",
"phone":"099989898",
"message":"PLAY 23"
}
The sending service expects a response of HTTP status 200 from your web server and JSON encoded result "result":"ok"
{
"result":"ok"
}
Payload to initiate a sending SMS message
recipient | string Recipient phone number to send SMS |
content | string Content of the SMS |
order_id | string (OrderIdDefinition) Unique orderID generated by client |
{- "recipient": 357999999,
- "content": "Hello world!",
- "order_id": 123454566
}
{- "result": "ok",
- "message_id": "18e2fb66-995c-451f-a596-75501405b4af",
- "order_id": 123454566,
- "num_parts": 1
}
message_id required | string message ID to check the status |
{- "result": "ok",
- "send_id": "79b06e1943b148319883b38f345fdfe2",
- "status": "sent",
- "num_parts": 1,
- "provider": "clickatell"
}
Payload to initiate a sending of the bulk messages
required | Array of objects (BulkMessageItem) |
order_id | string (OrderIdDefinition) Unique orderID generated by client |
country required | string country to send SMS |
{- "data": [
- {
- "recipient": 35799000000,
- "content": "Hello world!"
}
], - "order_id": 123454566,
- "country": "KE"
}
{- "result": "ok",
- "batch_id": "18e2fb66-995c-451f-a596-75501405b4af",
- "order_id": 123454566
}
batch_id required | string Batch ID to check the status |
{- "status": "processed",
- "num_sent": 300,
- "last_error": "Error message",
- "created_at": "2022-05-27 19:55:24",
- "messages": [
- {
- "message_id": "a8122d19-375d-431d-b95f-a5f682a0ec41",
- "recipient": 254701950056,
- "provider": "clickatell",
- "country": "KE",
- "status": "processed",
- "error": "Error message",
- "created_at": "2022-05-27 19:55:24",
- "updated_at": "2022-05-27 19:55:24",
- "sent_at": "2022-05-27 19:55:24"
}
]
}