Africa One Solutions

API Documentation

Integrate SMS sending, delivery tracking, and contact management into your application with the Africa One Solutions REST API.

Overview

The Africa One Solutions API is a RESTful interface for sending transactional and campaign SMS, querying delivery status, and managing contacts. All endpoints return JSON.

Base URL

https://sms.africaonesolutions.co.tz/api/v3

Content type

application/json

Charset

UTF-8

Every path below is relative to that base URL. The legacy /api/http prefix serves the same endpoints with the same payloads, so an integration written against the older platform keeps working unchanged — including sms/send over GET or POST, with the fields in the query string, which is how many existing integrations call it. A recipient outside the countries your account may send to is skipped rather than failing the whole request: the response reports requested, sent_to and skipped, so a partial delivery is never presented as a complete one.

Authentication

Every request must present an API key. The preferred form is a Bearer token in the Authorization header.

Example request header
Authorization: Bearer <your_api_token>

For backward compatibility the same key may also be sent as an api_token query parameter, a form field, a JSON body field, or an api_token cookie. The header is checked first, then the query string, cookie, form body, and JSON body.

Same request, key in the body
curl -X POST "https://sms.africaonesolutions.co.tz/api/v3/sms/send" \
  -H "Content-Type: application/json" \
  -d '{
    "api_token": "<your_api_token>",
    "recipient": "255717222303",
    "message": "Hello",
    "sender_id": "YOURID"
  }'

Create and revoke keys in the dashboard under API Keys, where each key can be named for the system that uses it. A request with no key, or a revoked one, answers 401 Unauthorized; a key whose account may not send answers 403 Forbidden.

Response envelope

Every response is wrapped in a consistent envelope. The status field is success, error, or info. The data field contains the payload when the request succeeds.

Success example
{
  "status": "success",
  "message": "Message accepted for delivery",
  "data": {
    "uid": "abc123",
    "to": "255717222303",
    "from": "YOURID",
    "message": "Hello",
    "sms_type": "plain",
    "status": "queued",
    "direction": "api",
    "sms_count": 1,
    "cost": "1",
    "sent_at": "2026-10-16T09:41:12Z"
  }
}
Error example
{
  "status": "error",
  "message": "Sender ID \"SHADOW\" is not authorized to send this message."
}

A send that the network refuses is reported as info with HTTP 200: the request was valid, but the message was not accepted for delivery, and the message field carries the reason.

HTTP status codes

Code Meaning
200Request handled. Check status: success, error (rare on 200) or info.
401Missing or invalid API key.
403The account or API access is not enabled, or the sender ID is not authorized for it.
404The record does not exist, or does not belong to the authenticated account.
422Validation failed: missing recipient, message or sender ID, an unparsable datetime, or insufficient balance.
500Unexpected server error. Safe to retry the read endpoints.
POST

/sms/send

Send a single SMS message to one recipient.

Sample request

Send one SMS
curl -X POST "https://sms.africaonesolutions.co.tz/api/v3/sms/send" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"recipient":"255717222303","message":"Hello from the API","sender_id":"YOURID"}'

Request body

Field Type Required Description
recipientstringyesDestination phone number in E.164 or local format. Punctuation is ignored; 9–15 digits are accepted.
messagestringyesMessage body. Long messages are split and concatenated automatically.
sender_idstringyesApproved sender ID for your account.
typestringnoMessage type: plain (default) or unicode. otp is accepted and sent as plain.

A recipient holding a comma-separated list is treated as a bulk send and answered like /sms/campaign, so one call can address a list. Each number is billed separately; duplicates in the same request are sent once.

POST

/sms/campaign

Send a bulk campaign to multiple recipients.

Sample request

Send a campaign
curl -X POST "https://sms.africaonesolutions.co.tz/api/v3/sms/campaign" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"October promo","recipient":"255717222303,255712345678","message":"Hello from the API","sender_id":"YOURID"}'

Request body

Field Type Required Description
recipientstringyesComma-separated list of phone numbers.
messagestringyesCampaign message body.
sender_idstringyesApproved sender ID.
namestringnoCampaign name. Generated automatically if omitted.
typestringnoplain (default) or unicode.
Response
{
  "status": "success",
  "message": "Campaign created successfully",
  "data": {
    "uid": "campaign123",
    "name": "Launch Campaign"
  }
}

The whole campaign is checked against your balance before it is accepted, so a list you cannot afford is refused with 422 instead of being created and then skipped.

GET

/sms

List sent messages for the authenticated user. The default window is the last 30 days, 25 rows per page, in the Laravel paginator shape (data, current_page, last_page, total, links).

Sample request

List your messages
curl -X GET "https://sms.africaonesolutions.co.tz/api/v3/sms?per_page=25&page=1" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Query parameters

Parameter Description
pagePage number (default 1).
start_dateFilter from this datetime (Y-m-d H:i:s).
end_dateFilter up to this datetime (Y-m-d H:i:s).
sms_typeFilter by plain or unicode.
directionFilter by api or outgoing.
timezoneIANA name the dates are interpreted and returned in, e.g. Africa/Dar_es_Salaam. Defaults to the platform timezone.
GET

/sms/:uid

Return one message by its uid, including the SMSC delivery receipt when the network has reported on it. A uid that belongs to another account answers 404.

Sample request

Read one message
curl -X GET "https://sms.africaonesolutions.co.tz/api/v3/sms/6f1c2b8e4d5a4c3f9b7e2a1d0c9b8a76" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
GET

/delivery-logs

Query delivery logs with the same filters and pagination as /sms. The status parameter narrows the result to one status, for example delivered, rejected or queued.

Sample request

List delivery logs
curl -X GET "https://sms.africaonesolutions.co.tz/api/v3/delivery-logs" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
GET

/delivery-logs/:uid

The delivery detail of one message: its status history and the raw receipt as the network sent it, with the submit and done times.

Sample request

Read one delivery log
curl -X GET "https://sms.africaonesolutions.co.tz/api/v3/delivery-logs/6f1c2b8e4d5a4c3f9b7e2a1d0c9b8a76" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
GET

/campaign/:uid/view

One campaign with its messages, so a bulk send can be followed recipient by recipient.

Sample request

Read a campaign
curl -X GET "https://sms.africaonesolutions.co.tz/api/v3/campaign/:uid/view" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Message status

A message starts queued, moves through submitted or enroute, and ends delivered — or rejected, undelivered, failed, expired or deleted with the network's error code in the receipt. A status only changes when the network says so: a message with no receipt yet stays queued rather than being reported as delivered.

GET

/contacts

Contact groups and the contacts inside them. Group identifiers are the group uid; the same uid addresses an individual contact.

Sample request

List contact groups
curl -X GET "https://sms.africaonesolutions.co.tz/api/v3/contacts" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Sample request

Create a contact group
curl -X POST "https://sms.africaonesolutions.co.tz/api/v3/contacts" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"Customers"}'

Sample request

Add a contact to a group
curl -X POST "https://sms.africaonesolutions.co.tz/api/v3/contacts/42/store" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"phone":"255717222303","first_name":"Amina"}'

Sample request

Update a contact
curl -X PATCH "https://sms.africaonesolutions.co.tz/api/v3/contacts/42/update/6f1c2b8e4d5a4c3f9b7e2a1d0c9b8a76" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"phone":"255717222303","first_name":"Amina"}'

Sample request

Delete a contact
curl -X DELETE "https://sms.africaonesolutions.co.tz/api/v3/contacts/42/delete/6f1c2b8e4d5a4c3f9b7e2a1d0c9b8a76" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
Method Path Purpose
GET/contactsList contact groups.
POST/contactsCreate a group.
POST/contacts/:uid/showRead one group.
PATCH/contacts/:uidRename a group.
DELETE/contacts/:uidDelete a group.
POST/contacts/:group_id/allList the contacts inside a group.
POST/contacts/:group_id/search/:uidFind one contact in a group.
POST/contacts/:group_id/storeAdd a contact to a group.
PATCH/contacts/:group_id/update/:uidUpdate a contact in a group.
DELETE/contacts/:group_id/delete/:uidRemove a contact from a group.
GET

/me

Return the authenticated account: profile, timezone, locale, and the sender IDs it may use.

Sample request

Your account
curl -X GET "https://sms.africaonesolutions.co.tz/api/v3/me" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

sender_ids is the list to choose from when calling /sms/send or /sms/campaign: every entry there is accepted as the sender_id field, and anything else answers 403. The list is empty when the account has no approved sender ID yet, so an integration can check it instead of discovering the problem on the first send.

Example response
{
  "status": "success",
  "message": null,
  "data": {
    "uid": "667b5e4de5ea4e47b37ac117ef0e28df",
    "email": "you@example.com",
    "locale": "en",
    "timezone": "Africa/Dar_es_Salaam",
    "sender_ids": ["MiaInfo", "SportPesa"]
  }
}
GET

/balance

Return the remaining SMS units and the date they expire.

Sample request

Your balance
curl -X GET "https://sms.africaonesolutions.co.tz/api/v3/balance" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
GET

/ping

Confirm the key works and the API is reachable. This is the cheapest endpoint to call from a health check.

Sample request

Ping
curl -X GET "https://sms.africaonesolutions.co.tz/api/v3/ping" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Keeping your keys safe

Anyone holding a key can send from your balance, so treat it like a password and never put it in a public repository or a browser-side script. Generate a separate key per system, so one can be revoked without disturbing the others.

A key is shown once when it is created; only a hash is stored and it cannot be displayed again. Lost keys are replaced, not recovered.

Install Africa One Solutions

    Already installed? Open it from your home screen or app list — this offer disappears once it is installed.