The HTTP API does the same jobs as the main API, but the token goes in the request as api_token instead of a header. Use it for older systems, plugins or devices that cannot set headers. If you can set headers, use the main API.
Send an SMS
/api/http/sms/sendSends an SMS. The parameters are the same as the main API, plus api_token.
Body parameters
| Parameter | Required | Description |
|---|---|---|
api_tokenstring | Required | Your API token from Developers in your dashboard. |
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 | plain for SMS, otp for an OTP. |
messagestring | Required | The text of your message. |
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. |
curl -X POST "https://app.nkomosms.com/api/http/sms/send" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"api_token": "YOUR_API_TOKEN",
"recipient": "233552690110",
"sender_id": "YourBrand",
"type": "plain",
"message": "Hello from Nkomo SMS"
}'<?php
$ch = curl_init('https://app.nkomosms.com/api/http/sms/send');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'api_token' => 'YOUR_API_TOKEN',
'recipient' => '233552690110',
'sender_id' => 'YourBrand',
'type' => 'plain',
'message' => 'Hello from Nkomo SMS',
]),
]);
$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/http/sms/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"api_token": "YOUR_API_TOKEN",
"recipient": "233552690110",
"sender_id": "YourBrand",
"type": "plain",
"message": "Hello from Nkomo SMS"
}),
});
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/http/sms/send",
headers={"Accept": "application/json"},
json={
"api_token": "YOUR_API_TOKEN",
"recipient": "233552690110",
"sender_id": "YourBrand",
"type": "plain",
"message": "Hello from Nkomo SMS"
},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"]){
"status": "success",
"data": "…"
}{
"status": "error",
"message": "A human-readable description of the error."
}Send with a single link
/api/http/sms/sendSome systems can only open a URL. Put every field in the link:
https://app.nkomosms.com/api/http/sms/send?recipient=233552690110&sender_id=YourBrand&message=Hello&api_token=YOUR_API_TOKENView an SMS
/api/http/sms/{uid}Returns one message and its delivery status.
Path parameters
| Parameter | Required | Description |
|---|---|---|
uidstring | Required | The message uid returned when the message was sent. |
curl -X GET "https://app.nkomosms.com/api/http/sms/606812e63f78b?api_token=YOUR_API_TOKEN" \
-H "Accept: application/json"<?php
$ch = curl_init('https://app.nkomosms.com/api/http/sms/606812e63f78b?api_token=YOUR_API_TOKEN');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
],
]);
$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/http/sms/606812e63f78b?api_token=YOUR_API_TOKEN', {
method: 'GET',
headers: {
Accept: 'application/json',
},
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.get(
"https://app.nkomosms.com/api/http/sms/606812e63f78b?api_token=YOUR_API_TOKEN",
headers={"Accept": "application/json"},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"]){
"status": "success",
"data": "…"
}{
"status": "error",
"message": "A human-readable description of the error."
}List your messages
/api/http/smsReturns your messages in pages.
curl -X GET "https://app.nkomosms.com/api/http/sms?api_token=YOUR_API_TOKEN" \
-H "Accept: application/json"<?php
$ch = curl_init('https://app.nkomosms.com/api/http/sms?api_token=YOUR_API_TOKEN');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
],
]);
$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/http/sms?api_token=YOUR_API_TOKEN', {
method: 'GET',
headers: {
Accept: 'application/json',
},
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.get(
"https://app.nkomosms.com/api/http/sms?api_token=YOUR_API_TOKEN",
headers={"Accept": "application/json"},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"]){
"status": "success",
"data": "…"
}{
"status": "error",
"message": "A human-readable description of the error."
}Verify an OTP
/api/http/otp/verifyChecks an OTP code. Works the same as the main OTP verify endpoint.
Body parameters
| Parameter | Required | Description |
|---|---|---|
api_tokenstring | Required | Your API token. |
recipientstring | Required | The number the OTP was sent to. |
codestring | Required | The code your user entered. |
curl -X POST "https://app.nkomosms.com/api/http/otp/verify" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"api_token": "YOUR_API_TOKEN",
"recipient": "233552690110",
"code": "482910"
}'<?php
$ch = curl_init('https://app.nkomosms.com/api/http/otp/verify');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'api_token' => 'YOUR_API_TOKEN',
'recipient' => '233552690110',
'code' => '482910',
]),
]);
$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/http/otp/verify', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"api_token": "YOUR_API_TOKEN",
"recipient": "233552690110",
"code": "482910"
}),
});
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/http/otp/verify",
headers={"Accept": "application/json"},
json={
"api_token": "YOUR_API_TOKEN",
"recipient": "233552690110",
"code": "482910"
},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"]){
"status": "success",
"data": {
"recipient": "233552690110",
"verified": true
},
"message": "Code verified."
}{
"status": "error",
"message": "A human-readable description of the error."
}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.