Nkomo SMS API documentation

Send SMS, OTP codes and voice messages from your website, app or school system. A JSON REST API with code samples in cURL, PHP, Node.js and Python.

Base URLhttps://app.nkomosms.com/api/v3

Quick start

  1. Create an account

    Sign up free with your name, email and phone number, then top up from GH₵10.

  2. Get your API token

    In your dashboard, open Developers and generate your API token.

  3. Get a Sender ID

    Request the name your messages come from. Read the Sender ID guide.

  4. Send your first SMS

    Replace the token and number below and run it.

Send your first SMS
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": "plain",
    "message": "Hello from Nkomo SMS"
  }'

Authentication

Every request needs your API token. Send it in the Authorization header as a Bearer token, and ask for JSON with the Accept header.

Headers

ParameterRequiredDescription
AuthorizationheaderRequiredBearer YOUR_API_TOKEN
AcceptheaderRequiredapplication/json
Content-TypeheaderOptionalapplication/json when you send a request body.

If your system cannot set headers, use the HTTP API, which takes the token as an api_token field instead.

Keep your token secret. Anyone with it can send messages with your units. Call the API from your server, never from a mobile app or browser JavaScript. If your token leaks, generate a new one in Developers straight away.

Phone numbers and message length

Write numbers in international format without + or spaces: 233552690110, not 055 269 0110. You can send to MTN, Telecel and AirtelTigo numbers.

One SMS holds 160 standard characters. Longer messages are split into parts of 153 characters, and each part uses one unit. Messages with emoji or special characters hold 70 characters, or 67 per part.

Responses and errors

Every response is JSON with a status field. Check it before you use data.

Success
{
  "status": "success",
  "data": "…"
}
Error
{
  "status": "error",
  "message": "A human-readable description of the error."
}

Common reasons for an error

ProblemWhat to do
Missing or wrong API tokenCheck the Authorization header, or generate a new token in Developers.
Not enough SMS unitsTop up your account, or check your balance first with the balance endpoint.
Sender ID not approvedUse a Sender ID that shows as active in your dashboard.
Invalid phone numberUse international format without +, for example 233552690110.
A required field is missingCompare your request with the parameter table for that endpoint. The message field tells you which one.

API reference

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.