Quick Start
v1
Get up and running with the SMS Gateway API in minutes. This guide walks you through obtaining credentials, sending your first message, and checking its delivery status.
Prerequisites
API Key
An API key with sms:write permissions to send messages.
Base URL
All API requests are made to:
https://api.smsgateway.com/api/v1Step 1: Get Your API Key
- Log in to the SMS Gateway Dashboard.
- Navigate to Developer → API Keys.
- Click Generate New Key.
- Select the
sms:writepermission scope. - Copy and store your key securely — it starts with
sg_live_.
Important: Your API key is shown only once. Store it in a secure location such as environment variables. Never commit API keys to source control.
Step 2: Make Your First API Call
Send an SMS with a simple POST request. Replace YOUR_API_KEY with the key you generated above.
Send your first SMS
1curl -X POST https://api.smsgateway.com/api/v1/sms/send \2 -H "Authorization: Bearer YOUR_API_KEY" \3 -H "Content-Type: application/json" \4 -d '{5 "to": "+251911234567",6 "body": "Hello from SMS Gateway!"7 }'Step 3: Check Delivery Status
After sending a message, use the returned messageId to track its delivery status in real time.
Check delivery status
1curl -X GET https://api.smsgateway.com/api/v1/sms/{messageId}/status \2 -H "Authorization: Bearer YOUR_API_KEY"Response Format
All API responses follow a consistent JSON envelope structure:
Success response
1{2 "success": true,3 "data": {4 "messageId": "msg_8f2k3j4h5g",5 "status": "QUEUED",6 "to": "+251911234567",7 "from": "MyApp",8 "segments": 1,9 "cost": 0.02,10 "createdAt": "2026-07-20T14:30:00.000Z"11 }12}Error response
1{2 "success": false,3 "error": {4 "code": "VALIDATION_ERROR",5 "message": "Invalid phone number format. Use E.164 format (e.g., +251911234567)."6 }7}