Send a voice message
POST
/api/v3/sms/sendYour text is read out to the recipient as a phone call. Each voice message uses 7 units per number.
Body parameters
| Parameter | Required | Description |
|---|---|---|
recipientstring | Required | Phone number in international format without +, for example 233552690110. Separate several numbers with commas: 233552690110,233201234567. |
sender_idstring | Required | Your approved Sender ID, up to 11 characters. This is the name people see. How to get a Sender ID. |
typestring | Required | Must be voice. |
languagestring | Required | The language and accent of the voice. Use en-gb or en-us for English. All language codescy-gb, da-dk, de-de, el-gr, en-au, en-gb, en-gb-wls, en-in, en-us, es-es, es-mx, es-us, fr-ca, fr-fr, id-id, is-is, it-it, ja-jp, ko-kr, ms-my, nb-no, nl-nl, pl-pl, pt-br, pt-pt, ro-ro, ru-ru, sv-se, ta-in, th-th, tr-tr, vi-vn, zh-cn, zh-hk |
genderstring | Required | The voice: male or female. |
messagestring | Required | The text to read out. Write numbers and dates the way they should be spoken. |
schedule_timedatetime | Optional | Send later instead of now. Format Y-m-d H:i, for example 2026-12-24 08:00, in the time zone set on your account. |
Example request
curl -X POST "https://app.nkomosms.com/api/v3/sms/send" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"recipient": "233552690110",
"sender_id": "YourBrand",
"type": "voice",
"language": "en-gb",
"gender": "female",
"message": "Hello. This is a reminder that school reopens on Monday, the fifth of January."
}'<?php
$ch = curl_init('https://app.nkomosms.com/api/v3/sms/send');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'recipient' => '233552690110',
'sender_id' => 'YourBrand',
'type' => 'voice',
'language' => 'en-gb',
'gender' => 'female',
'message' => 'Hello. This is a reminder that school reopens on Monday, the fifth of January.',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'success') {
print_r($response['data']);
} else {
echo $response['message'] ?? 'Request failed';
}// Node.js 18 or newer (fetch is built in)
const res = await fetch('https://app.nkomosms.com/api/v3/sms/send', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"recipient": "233552690110",
"sender_id": "YourBrand",
"type": "voice",
"language": "en-gb",
"gender": "female",
"message": "Hello. This is a reminder that school reopens on Monday, the fifth of January."
}),
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.post(
"https://app.nkomosms.com/api/v3/sms/send",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json"},
json={
"recipient": "233552690110",
"sender_id": "YourBrand",
"type": "voice",
"language": "en-gb",
"gender": "female",
"message": "Hello. This is a reminder that school reopens on Monday, the fifth of January."
},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"])Response
{
"status": "success",
"data": "…"
}Error response
{
"status": "error",
"message": "A human-readable description of the error."
}Check a voice message the same way as an SMS, with View an SMS.
Need help with your integration?
Message us on WhatsApp, call +233 55 269 0110 or email support@nkomosms.com. Send us the request you made and the response you got, but never your API token.