Send SMS Using Header Authorization
Send SMS requests with API credentials passed in request headers.
Last updated · Markdown version
Header authorization using a single Bearer token is the recommended way to send SMS from server-side applications because credentials stay out of URLs and logs.
Endpoints
HTTP
POST /api/v2/messages/sms
POST /api/v2/messages/sms/bulkAuthorization
Use standard Bearer authorization:
HTTP
Authorization: Bearer bk_live_8n6JQv3K1h9Lp0Md
Content-Type: application/jsonLegacy dual headers (X-API-Key & X-API-Secret) remain supported for existing integrations.
Request example
cURL / Bash
curl -X POST "https://api.bulkitsms.com/api/v2/messages/sms" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer bk_live_8n6JQv3K1h9Lp0Md" \
-d '{
"sender": "BULK_IT",
"mobile": "254700000001",
"message": "Your Bulkit verification code is 482193."
}'Notes
- use Bearer authorization for backend services and worker processes
- pass your sender name directly in
"sender": "BULK_IT"(or"sender_id"with UUID for legacy integrations) - keep API tokens in environment variables, not frontend code
- for bulk SMS, use
/api/v2/messages/sms/bulkwith"mobiles": ["254700000001", "254711111111"]
Error response
JSON
{
"status": "error",
"message": "Invalid API Key or Secret"
}