📨 Send a Message
POST /api/v1/sendSend an SMS to any phone number.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | ✅ | Your Fire SMS API key |
to | string | ✅ | Recipient number — include country code, no + (e.g. 27821234567) |
text | string | ✅ | The message body |
Include the country code without a leading +. For South Africa, 0821234567 becomes 27821234567. For Lesotho, 59001234 becomes 26659001234.
Example Request
cURL
curl -X POST https://firesms.vercel.app/api/v1/send \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"to": "27821234567",
"text": "Hello from Fire SMS"
}'Response
{
"status": "success",
"id": "msg_abc123",
"batch_id": "msg_abc123",
"price": 0.25,
"remaining_credits": 49.75
}| Field | Type | Description |
|---|---|---|
status | string | success or error |
id | string | Unique message ID |
price | number | Cost charged for this message in ZAR |
remaining_credits | number | Your remaining credit balance in ZAR |
Error Response
{
"status": "error",
"error": "Insufficient credits. Please top up your account."
}| HTTP status | Meaning |
|---|---|
400 | Missing or invalid parameters |
401 | Invalid API key |
402 | Insufficient credits |
422 | No SMS provider configured — set one up in Settings |
500 | Send failed — check your provider credentials |
Last updated on