https://tools.tornevall.net/api/sms
All SMS endpoints require API key OR web session.
API key (recommended for integrations):
toolsApi.api_keysprovider = 'provider_sms_mail'is_global = 1is_active = 1Header:
X-Api-Key: YOUR_SECRET_KEY
Query parameter (legacy support):
?apikey=YOUR_SECRET_KEY
Queue an SMS for sending (writes to GSMv2.pduout).
POST /api/sms/send
Content-Type: application/json
X-Api-Key: YOUR_SECRET_KEY
{
"destination": "+46701234567",
"message": "Hello from API",
"class": "-1",
"central": ""
}
| Field | Required | Type | Notes |
|---|---|---|---|
| destination | Yes | string | Phone number |
| message | Yes | string | Max 512 chars |
| class | No | string | SMS class; use 0 for flash if your gateway supports it |
| central | No | string | SMS central name |
{
"success": true,
"pduid": 4106,
"message": "SMS queued for sending"
}
401 Unauthorized if no valid API key or web session500 on DB/queue errorsGet status of an outgoing SMS.
GET /api/sms/{pduid}/status
X-Api-Key: YOUR_SECRET_KEY
{
"pduid": 4106,
"recipient": "+46701234567",
"message": "Hello from API",
"status": "queued",
"tries": 0,
"created_at": 1709035200
}
Flash SMS depends on your SMS gateway. The API supports it through class.
class = "0" (flash class) via /api/sms/sendsender-stream.sh passes class to gateway if configured# In sender-stream service env
FLASH_CLASS=0
SMSGATE_CLASS_PARAM=messageClass
SMSGATE_FLASH_PARAM=isFlash
SMSGATE_FLASH_VALUE=true
SMSGATE_FLASH_PARAM.docs/SMS_PREFIX_CALLBACK_RESPONSES.md (callback reply behavior)docs/NOTIFY_MAIL_SMS_UPGRADE.md (mail notification sender)