Send templated message
Provide the destination number to, and optional callback_url, plus all template parameters under params as additional JSON fields (all string values). Check the Templates API for fetching the template id.
Callback request example (DLR - delivery notification)
POST /<callback_url>
{
"error": "000",
"from": "18888112345",
"message_id": "8bd71f49-6f42-4729-bf5e-ecf857747633",
"status": "DELIVERED",
"to": "16197012345",
"type": "DLR"
}Each request contains the following information:
message_id- the id of the message which has been returned following/sendrequestfrom- the source address the message was sent fromto- the destination address which has received the messagestatus- the status of the messageDELIVERED- Message has been deliveredEXPIRED- Message wasn't delivered within the 48 hour periodUNDELIVERABLE- Message wasn't delivered (check theerror)UNKNOWN- Message wasn't delivered due to a unknown reasonREJECTED- Message was rejected by the supplier (check theerror)
type- type of the callback, eitherDLRfor delivery notification orMOfor mobile originated messageerror- The error code returned by the supplier (check the table below for possible values)
0
DELIVERED
1
UNKNOWN_SUBSCRIBER
5
UNIDENTIFIED_SUBSCRIBER
9
ILLEGAL_SUBSCRIBER
11
TELESERVICE_NOT_PROVISIONED
13
CALL_BARRED
21
FACILITY_NOT_SUPPORTED
27
ABSENT_SUBSCRIBER
31
SUBSCRIBER_BUSY_FOR_MT_SMS
32
DELIVERY_FAILURE
34
SYSTEM_FAILURE
36
UNEXPECTED_DATA_VALUE
37
MEMORY_CAPACITY_EXCEEDED
38
PREFIX_NOT_RESOLVED
39
IMSI_BLACKLISTED
40
DEST_ADDRESS_BLACKLISTED
41
TIME_OUT
43
INVALID_ORIGINATOR_ADDRESS
100
GENERAL_ERROR
200
EQUIPMENT_PROTOCOL_ERROR
201
UNKNOWN_MSC
202
CONGESTION_ERROR
203
PARAMETER_MISSMATCH
204
INITIATING_RELEASE
205
POTENTIAL_VERSION_INCOMPATIBILITY
206
REMOTE_NODE_NOT_REACHABLE
207
MTP_FAILURE
346
CLIENT_NETWORK_FORBIDDEN (In a case of MNP being performed)
351
INVALID_PREFIX_OR_DESTINATION
4100
EXPIRED_ON_FORCE_RETRY (When the time to live has been configured for delivery and it has expired)
Callback request example (MO - mobile originated message)
POST /<callback_url>
Each request contains the following information:
message_id- the id of the mobile originated messagefrom- the mobile number the message has been sent fromto- the mobile number which has received the messagetype- type of the callback, eitherDLRfor delivery notification orMOfor mobile originated messagetext- the text of the message which has been sentfromtotonumber
API key header.
Template id
Destination MSISDN in international format (e.g., 44...)
Accepted or rejected by business validation
Request invalid (e.g. missing uuid or template parameter validation failure)
Unauthorized (missing/invalid API key)
Template not found
Failed to send
Last updated

