POST /api/sms/send
Send an SMS immediately or schedule one for later, list/cancel pending scheduled messages - request/response shapes, billing, error handling.
POST /api/sms/send
Send an SMS message to any phone number using your 6X wallet balance — either right away, or scheduled for a future time. Billed the same per-message rate as sending from your portal — the API Access add-on covers API access itself, not SMS usage.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| to | string | Yes | Recipient phone in international format e.g. +447911123456 |
| from | string | Yes | Sender ID shown to the recipient (max 11 characters, letters/numbers) |
| message | string | Yes | SMS message text |
| send_at | string | No | A future date/time (ISO 8601, e.g. 2026-09-05T14:00:00Z) — queues the message instead of sending immediately. Omit to send right away. |
Example request (send immediately)
curl -X POST https://app.6xcom.com/api/sms/send \
-H "X-API-Key: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"to":"+447911123456","from":"6XBusiness","message":"Your appointment is confirmed for 3pm."}'
Response
{
"success": true,
"message_id": "abc123",
"parts": 1,
"amount": 0.03,
"balance": 9.6531
}
Scheduling a message for later
Add send_at with a future timestamp and the message is queued instead of sent — nothing is charged until it actually goes out. Useful for appointment reminders, drip sequences, or any "send this later" case. See the Scheduled SMS product page for the full overview and FAQ.
curl -X POST https://app.6xcom.com/api/sms/send \
-H "X-API-Key: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"to":"+447911123456","from":"6XBusiness","message":"Reminder: your appointment is tomorrow at 3pm.","send_at":"2026-09-05T14:00:00Z"}'
Response
{
"success": true,
"scheduled": true,
"scheduled_id": 17,
"send_at": "2026-09-05T14:00:00+00:00"
}
Scheduled messages are checked every minute, so delivery lands within about a minute of your requested time. Billing happens at the moment it actually sends, at whatever your normal SMS rate is then — not reserved upfront when scheduled.
GET /api/sms/scheduled
List your pending scheduled messages.
curl https://app.6xcom.com/api/sms/scheduled -H "X-API-Key: YOUR_API_TOKEN"
{
"success": true,
"scheduled": [
{
"id": 17,
"to_number": "+447911123456",
"from": "6XBusiness",
"message": "Reminder: your appointment is tomorrow at 3pm.",
"send_at": "2026-09-05T14:00:00.000000Z",
"status": "pending"
}
]
}
DELETE /api/sms/scheduled/{id}
Cancel a scheduled message before it sends. Once it's fired, this returns a 404 — cancellation only works on messages still in pending status.
curl -X DELETE https://app.6xcom.com/api/sms/scheduled/17 -H "X-API-Key: YOUR_API_TOKEN"
{"success": true}
Error codes
| Status | Meaning |
|---|---|
| 200 | Sent, scheduled, listed, or cancelled successfully |
| 400 | Send failed — check error in the response (insufficient balance, destination not supported, validation error, etc.) |
| 401 | Missing or invalid API key |
| 404 | (scheduled/cancel only) No pending scheduled message with that id on your account |
| 422 | send_at was not a valid future date |
Note: this endpoint uses your API key via the X-API-Key header (not the Authorization: Bearer scheme used elsewhere in the API) and has its own separate rate limit (60 requests/minute) from the daily API cap described in API Authentication.