SMS TO HASHED SAFARICOM NUMBERS
This endpoint is used to send messages to Safaricom hashed numbers. Make sure the hashed values start with 254 before hashing.
Caution
This endpoint is strictly for sending transactional messages only. We do not allow promotional content on hashed numbers. The hashing mechanism ensures regulatory compliance.
Misuse may result in strict measures, including potential suspension or blacklisting.
Tip
Checkout code examples in Send SMS.
POST Method
Endpoint:https://{{url}}/api/services/sendotp
Request Body:
{
"apikey": "{{apikey}}",
"partnerID": "{{partnerID}}",
"mobile": "{{mobile}}", //hashed msisdn
"message": "{{message}}",
"shortcode": "{{shortcode}}",
"hashed": true
}
Sample Success Response:
{
"responses":[
{
"response-code":200,
"response-description":"Success",
"mobile":"xxxxxxxxxxxxx",
"messageid":"xxxxxxxxxxxxx",
"networkid":1
}
]
}
Sample Error Response:
{
"response-code":1006,
"response-description":"Invalid credentials"
}