Skip to main content
POST
/
message
/
{serviceId}
cURL
curl --request POST \
  --url https://api.belio.co.ke/message/{serviceId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "SendToEach",
  "messages": [
    {
      "text": "<string>",
      "phone": "<string>"
    }
  ]
}
'
{
  "desc": {
    "requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "units": {
      "Safaricom": 123,
      "Airtel": 123
    },
    "addresses": {
      "Safaricom": 123,
      "Airtel": 123
    }
  }
}
Refer to Authentication for information on how to obtain a bearer token. This endpoint requires the message.sms.send.oneway API client authorization scope to send one way messages. You can set up scopes on the API Clients page.

Rate Limit

This endpoint is rate limited to 400 messages per second.

Request Modes

The API supports two request modes:
  • SendToMany — same message is sent to multiple recipients
  • SendToEach — message is sent to individual recipients.(Messages can be tailored for each recipient)
Both modes support a maximum of 100 recipients per request and a 960 character limit for each message.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

serviceId
string
required

Unique identifier for the messaging service

Body

application/json

Message details for sending to one or multiple recipients

Send message to a single recipient

type
enum<string>
required

Indicates sending to a single recipient

Available options:
SendToEach
messages
object[]
required

Messages and recipients

receiptRequest
object

Response

Message(s) sent successfully

desc
object

The response