API Documentation
Use these integration APIs to send SMS from your platform securely.
Quick Start
Generate an API key in the API Keys page, then switch languages below to copy a ready-to-use integration sample.
Base URL: https://dev.darsms.co.tz/api/v1
Auth Header: X-API-Key: your_api_key
Sender ID: pass the approved sender label, for example DARSMS
Rate Limit: 180 requests/minute per API key
Format: Tanzanian numbers like 2557XXXXXXXX or +2557XXXXXXXX
1. Send SMS
Send one message to one or many recipients.
cURL
curl -X POST "https://dev.darsms.co.tz/api/v1/integrations/sms/send" \
-H "Content-Type: application/json" \
-H "X-API-Key: darsms_xxxxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{
"senderId": "DARSMS",
"to": ["255712345678", "255754321987"],
"message": "Dear James, your payment is due on 2026-05-05."
}'2. Check Balance
Fetch the current SMS balance for the account.
cURL
curl -X GET "https://dev.darsms.co.tz/api/v1/integrations/balance" \
-H "X-API-Key: darsms_xxxxxxxxxxxxxxxxxxxxxxxxxx"3. Check Message Status
Look up delivery state for a sent message.
cURL
curl -X GET "https://dev.darsms.co.tz/api/v1/integrations/sms/status/cm_sms_message_id" \
-H "X-API-Key: darsms_xxxxxxxxxxxxxxxxxxxxxxxxxx"Error Format
{
"success": false,
"message": "Invalid API key",
"details": null
}Common statuses: 401 invalid key, 403 inactive company/account, 422 validation errors, 429 rate limit.
