Send SMS, check delivery status and read your balance with a single JSON API. Free on every plan, no separate API fee.
https://api.nasisms.co.tz/api/v1HTTP BasicJSONGenerate an API key pair from your dashboard under API Keys. Your secret is shown once at creation, so store it safely: only its hash is kept afterwards.
Combine them as api_key:api_secret and send them as HTTP Basic credentials on every request, alongside JSON headers:
Authorization: Basic <base64(api_key:api_secret)>Content-Type: application/json on POST requestsAccept: application/json on every requestRevoke or delete a key any time from the same page. A revoked key is rejected immediately, and a suspended account loses API access entirely.
# Most HTTP libraries handle Basic Auth for you —
# curl's -u flag builds the header automatically:
curl https://api.nasisms.co.tz/api/v1/balance \
-u "$API_KEY:$API_SECRET" \
-H "Accept: application/json"
# => 200 OK
{
"balance": 12750.00,
"currency": "TZS"
}/sms/sendQueue an SMS to one or many recipients. Sending happens asynchronously: this call queues the campaign and returns immediately.
| Field | Type | Required | Notes |
|---|---|---|---|
| from | string | Required | Your Sender ID, max 20 characters. Must already be approved and in 'ready' status. |
| to | string or array | Required | One MSISDN or an array of them, e.g. "255712345678". Duplicates are removed automatically. |
| text | string | Required | The message body, max 4,000 characters. |
| reference | string | Optional | Your own tracking ID for this send, max 100 characters. |
Note: the status returned here reflects that your message has been queued, not its final delivery outcome. Poll GET /sms/logs to see when a message updates to delivered or failed. There is currently no delivery webhook.
{
"messages": [
{
"to": "255712345678",
"status": {
"groupName": "PENDING",
"name": "PENDING_ENROUTE",
"description": "Message queued for sending"
},
"smsCount": 1
},
{
"to": "255678901234",
"status": {
"groupName": "PENDING",
"name": "PENDING_ENROUTE",
"description": "Message queued for sending"
},
"smsCount": 1
}
]
}/sms/logsPaginated history of messages sent from your account, filterable by date range and status.
| Field | Type | Required | Notes |
|---|---|---|---|
| page | integer | Optional | Page number of results. Defaults to 1. |
| per_page | integer | Optional | Results per page, 1–100. Defaults to 20. |
| from | date | Optional | Filter to messages sent on or after this date (YYYY-MM-DD). |
| to | date | Optional | Filter to messages sent on or before this date (YYYY-MM-DD). |
| status | string | Optional | Filter by exact status, e.g. queued, sent, delivered, failed. |
{
"data": [
{
"id": 1,
"to": "255712000001",
"text": "message body",
"status": "delivered",
"segments": 1,
"cost": 35.0,
"provider_message_id": "abc123xyz",
"source": "api",
"sent_at": "2026-07-01T14:30:00+03:00"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 243,
"last_page": 13
}
}/balanceYour current prepaid wallet balance.
No parameters required.
{
"balance": 12750.00,
"currency": "TZS"
}curl -X POST https://api.nasisms.co.tz/api/v1/sms/send \
-u "$API_KEY:$API_SECRET" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"from": "NASISMS",
"to": ["255712345678", "255678901234"],
"text": "Karibu! Punguzo la 20% leo tu.",
"reference": "promo-2026-07"
}'| Code | Meaning | Common cause |
|---|---|---|
| 400 | Bad Request | Missing required field, invalid phone number, or an unrecognised/inactive Sender ID. |
| 401 | Unauthorized | Missing or invalid API key/secret, a revoked key, or a suspended account. |
| 402 | Payment Required | Your wallet balance is too low to cover this campaign. |
| 422 | Unprocessable Entity | A field failed validation, e.g. text over 4,000 characters. |
| 429 | Too Many Requests | You're sending requests too quickly. |
| 500 | Server Error | An unexpected fault on our side. Retry, or contact support if it persists. |
{
"error": {
"code": 400,
"message": "Sender ID \"MYBRAND\" is not found or not yet active. Status must be 'ready'."
}
}Create a free account, generate an API key pair, and make your first call in minutes.
Create free account