Send your first SMS
This quickstart uses curl, but the request works from any server-side language.
1. Create an API key
In the SendAfrica dashboard, open Developer → API Keys, create a key, and copy it immediately. The full key is shown only once.
Store it as SENDAFRICA_API_KEY in your deployment secret store. Never commit it, place it in a frontend bundle, or paste it into a public issue.
2. Send a message
curl -X POST https://api.sendafrica.online/v1/sms/ \
-H "X-API-Key: $SENDAFRICA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"0712345678","message":"Your order is confirmed."}'Tanzania local numbers are normalized automatically. See phone numbers and SMS parts for international formats and billing.
3. Read the response
{
"success": true,
"data": {
"message_id": "f3b1c2d4-9e8a-4f2b-b1c2-d3e4f5a6b7c8",
"status": "Success",
"credits_used": 1
},
"request_id": "dfffa252-4781-43ff-8e1a-bf01a754d66a"
}Success means the message was accepted for delivery by the upstream route. It is not handset delivery confirmation. Use webhooks for final delivery events.
4. Check your balance
curl https://api.sendafrica.online/v1/credits/balance \
-H "X-API-Key: $SENDAFRICA_API_KEY"Continue with authentication, the SMS API, signed webhooks, or an SDK.
Try the starter project
The SendAfrica Skill is the canonical onboarding kit for developers and AI agents. It bundles ready-to-run templates for Python, TypeScript, Go, and curl, an interactive setup checklist, and a start-to-finish guide covering the API, SDKs, CLI, webhooks, and the Agent MCP server.
git clone https://github.com/SendAfrica/Skill.git
cd Skill
./scripts/get-started.sh # interactive checklist
./scripts/scaffold.sh python my-sms-app # or copy a templateEvery starter template keeps your API key in an environment variable — never in the source files.