api:sms:send
Table of Contents
API : Sms Send
Introduction
This request will send an SMS/MMS message.
Request
| URL | https://api.telecomx.dk/sms | ||
|---|---|---|---|
| Method | POST | ||
| Access level | PERSONAL, VIEWER, MANAGER, OWNER, RESELLER, ADMIN. | ||
| Body | type | String | Type of message: 'SMS', 'SMSFLASH' or 'MMS'. |
| message | String | The message: SMS - max. 1Kb. FLASHSMS - max. 160 characters. MMS - the MMS raw data, max. 512Kb. |
|
| from | String | Sender name or number (max 11 chars). Only available for MANAGER, OWNER, RESELLER and ADMIN, everybody else will present their own mobile phone number, so that messages may be replied to. | |
| to | String | Number of the recipient, E.164 format or… | |
| to | Array | Array of recipients in E.164 format (for sending to multiple recipients). | |
| group | String | Id of a PBX group whose members are the recipients. Mutually exclusive with 'to'. | |
Query examples
{
type: 'SMS',
message: 'this is a test',
from: 'Voicemail',
to: '+4581808888'
}
Response
| JSON object | ||
|---|---|---|
| success | Boolean | True on success |
| recipients | Number | Number of SMS messages sent |
Response example
{ success: true, recipients: 2 }
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | type | Type is invalid |
| 404 | message | Message is missing |
| 422 | message | Message is too long |
| 404 | from | From is missing |
| 404 | to | To is missing |
| 422 | to | To is not a valid phone number |
| 422 | to | One or more numbers are not valid |
| 422 | group | Group is invalid |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/sms/send.txt · Last modified: 2022/08/02 12:59 by Per Møller