Developer Quick Start Guide
End-to-end: get API key, send first SMS, check delivery, and set up webhooks.
From Zero to First SMS in 5 Minutes
This guide walks you through the complete developer workflow: authentication, sending your first message, checking delivery, and receiving real-time updates.
Step 1: Get Your API Key
- Log into your Sakura SMS account
- Go to Developer API in the sidebar
- Click Generate API Key
- Copy the key immediately — it's only shown once
- Store it securely (environment variable, secrets manager — never in source code)
Step 2: Send Your First SMS
Make a POST request to the Send SMS endpoint:
curl -X POST https://sms.sakuragroup.co.tz/api/v1/sms/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "255712345678",
"message": "Hello from Sakura SMS API!",
"sender_id": "SAKURA"
}'
Response:
{
"success": true,
"message_id": "msg_abc123",
"credits_used": 1,
"credits_remaining": 499
}
Step 3: Check Delivery Status
Poll the delivery status endpoint:
curl https://sms.sakuragroup.co.tz/api/v1/sms/status/msg_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
Possible statuses: queued, sent, delivered, failed
Step 4: Set Up Webhooks (Recommended)
Instead of polling, receive real-time delivery updates:
- Go to Developer API > Webhooks
- Add your endpoint URL
- Subscribe to
message.deliveredandmessage.failedevents - See the Webhook Setup Guide for details
Step 5: Send to Multiple Recipients
curl -X POST https://sms.sakuragroup.co.tz/api/v1/sms/send-bulk \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"recipients": ["255712345678", "255765432100"],
"message": "Bulk message via API",
"sender_id": "SAKURA"
}'
SDKs & Libraries
We provide official SDKs for popular languages. See the SDKs & Libraries article for installation and usage.
Related in Developer API
API Authentication
How to authenticate your API requests with Bearer tokens.
Sending SMS via API
Complete guide to sending SMS programmatically using the REST API.
Webhooks & Callbacks
Receive real-time delivery notifications and event callbacks.
SDKs & Libraries
Quick-start code examples in Node.js, Python, PHP, and Java.