SMS Gateway (9.1.0)

Download OpenAPI specification:Download

SMS Gateway API describes how to send transacional and bulk SMS via various telecom providers.

MO Messages

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

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

Example

{
  "dest":"8888",
  "phone":"099989898",
  "message":"PLAY 23"
}

Response

The sending service expects a response of HTTP status 200 from your web server and JSON encoded result "result":"ok"

Example

{
  "result":"ok"
}

Send SMS to the one or more recipients

Authorizations:
bearerAuth
Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
{
  • "recipient": 357999999,
  • "content": "Hello world!",
  • "order_id": 123454566
}

Response samples

Content type
application/json
{
  • "result": "ok",
  • "message_id": "18e2fb66-995c-451f-a596-75501405b4af",
  • "order_id": 123454566,
  • "num_parts": 1
}

Get message status by ID

Authorizations:
bearerAuth
path Parameters
message_id
required
string

message ID to check the status

Responses

Response samples

Content type
application/json
{
  • "result": "ok",
  • "send_id": "79b06e1943b148319883b38f345fdfe2",
  • "status": "sent",
  • "num_parts": 1,
  • "provider": "clickatell"
}

Send bulk messages to the list of the recipients

Authorizations:
bearerAuth
Request Body schema: application/json

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

Responses

Request samples

Content type
application/json
{
  • "data": [
    ],
  • "order_id": 123454566,
  • "country": "KE"
}

Response samples

Content type
application/json
{
  • "result": "ok",
  • "batch_id": "18e2fb66-995c-451f-a596-75501405b4af",
  • "order_id": 123454566
}

Get batch of the bulk messages status by ID

Authorizations:
bearerAuth
path Parameters
batch_id
required
string

Batch ID to check the status

Responses

Response samples

Content type
application/json
{
  • "status": "processed",
  • "num_sent": 300,
  • "last_error": "Error message",
  • "created_at": "2022-05-27 19:55:24",
  • "messages": [
    ]
}

Get report about sent SMS

Authorizations:
bearerAuth
query Parameters
date
string

Date to get report

Responses

Response samples

Content type
application/json
{
  • "balance": 400,
  • "data": [
    ]
}