SMS
Send SMS

Send SMS

Send a single SMS message to one recipient. Charges are deducted from your wallet immediately.


Endpoint

POST /v1/sms/send/

Authentication: Bearer API key


Request Body

{
  "mobile":    "254712345678",
  "message":   "Hello! Your order #1234 has been shipped.",
  "sender_id": "TALKNTALK"
}
FieldTypeRequiredDescription
mobilestringYesRecipient phone number in international format (254XXXXXXXXX)
messagestringYesSMS body — up to 160 characters per SMS part
sender_idstringNoSender name to show on recipient's device. Defaults to your organisation's default sender ID.

Request

curl -X POST https://api.talkntalk.africa/v1/sms/send/ \
  -H "Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "mobile":    "254712345678",
    "message":   "Hello from TalkNTalk!",
    "sender_id": "TALKNTALK"
  }'

Response

201 Created

{
  "id":         "018f3a2b-7c4d-7e1a-b3f2-9d8e2c1a4b5f",
  "mobile":     "254712345678",
  "sender_id":  "TALKNTALK",
  "message":    "Hello from TalkNTalk!",
  "status":     "queued",
  "created_at": "2026-05-20T11:30:00+03:00"
}
FieldDescription
idUUID — use this to look up the message in Fetch Messages
statusqueued — message is being dispatched to the provider
mobileRecipient number as submitted
sender_idSender name used

The message transitions from queuedsentdelivered as the provider processes it. Use Webhooks to get notified on each status change.


Code Examples

Node.js

const res = await fetch('https://api.talkntalk.africa/v1/sms/send/', {
  method:  'POST',
  headers: {
    'Authorization': 'Bearer tk_live_xxxx',
    'Content-Type':  'application/json',
  },
  body: JSON.stringify({
    mobile:    '254712345678',
    message:   'Hello from TalkNTalk!',
    sender_id: 'TALKNTALK',
  }),
});
const msg = await res.json();
console.log('Message ID:', msg.id, '| Status:', msg.status);

Python

import requests
 
r = requests.post(
    'https://api.talkntalk.africa/v1/sms/send/',
    headers={'Authorization': 'Bearer tk_live_xxxx'},
    json={
        'mobile':    '254712345678',
        'message':   'Hello from TalkNTalk!',
        'sender_id': 'TALKNTALK',
    },
)
msg = r.json()
print(f"ID: {msg['id']} | Status: {msg['status']}")

PHP

$ch = curl_init('https://api.talkntalk.africa/v1/sms/send/');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer tk_live_xxxx',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'mobile'    => '254712345678',
        'message'   => 'Hello from TalkNTalk!',
        'sender_id' => 'TALKNTALK',
    ]),
]);
$msg = json_decode(curl_exec($ch), true);
echo "ID: {$msg['id']} | Status: {$msg['status']}";

Rate Limits

This endpoint is limited to 300 requests per minute per organisation. Exceeding the limit returns HTTP 429. See Rate Limits for retry strategies.


Error Responses

StatusCodeDescription
400 Bad Requestmobile or message missing, or invalid sender_id
401 Unauthorizedauthentication_failedMissing or invalid API key
402 Payment Requiredinsufficient_balanceWallet balance too low
429 Too Many RequestsRate limit exceeded — retry after the Retry-After header