Request format:
curl 'http://1.1.1.1:8001/api?username=<username>&password=<password>&ani=<ani>&dnis=<dnis>&message=<message>&command=submit&serviceType=<serviceType>&longMessageMode=<longMessageMode>&messageType=mms&mmsContentUrl=<url>'
Parameter | Value | Required |
---|---|---|
command: | Request type. Possible values: “submit”, "query", "mo". To send a message over HTTP, specify command=submit | Yes |
dnis: | Destination number. Must be sent in international E.164 format (up to 15 digits allowed). If the field length exceeds 2048 symbols or 100 numbers, the incoming message will be rejected with the following code: 400 Bad Request (Destination number is too long). Multiple DNIS's cannot be used for longMessageMode=split_or_payload | Yes |
message: | Message text | Yes |
messageType | mms | Yes |
mmsContentUrl | Link to content, for example, ..mmsContentUrl='http://path/1.png'... with specified extension if the contentType parameter is not transferred (for example, in "1.png" png is the extension). Supported content extensions: jpg/jpeg | Yes |
password: | Password | Yes |
serviceType: | Service type, provided by the System owner for the registered interconnection. Can be blank. The maximum length is 9 bytes. | Yes |
username: | Login | Yes |
ani: | Caller ID. Technical limitation - alpha-numeric up to 32 symbols. Additional limitations can be caused by destination route peculiarities | No |
contentType | content type/extension. If the contentType parameter is not transferred, the extension must be present in mmsContentUrl. Possible values: image/jpeg | No |
dataCoding | data coding scheme for sending the SMPP to the vendor. Format: integer. Optional. Allowed values are: 0, 1, 3, 6, 7, 8, 10, 14, where: 0: SMSC Default Alphabet (SMPP 3.4)/MC Specific (SMPP 5.0) 1: IA5 (CCITT T.50)/ASCII (ANSI X3.4) 3: Latin 1 (ISO-8859-1) 6: Cyrillic (ISO-8859-5) 7: Latin/Hebrew (ISO-8859-8) 8: UCS2 (ISO/IEC-10646) 10: ISO-2022-JP (Music Codes) 14: KS C 5601 | No |
esmClass | corresponds to the same name parameter in SMPP. Format: integer. Optional. Allowed values are: 0-255 | No |
flash | Flag that indicates a flash message. Possible values are: 0 (regular message) and 1 (flash message that is shown on the screen and is not stored in the device memory). Please note that the flag is merely written to the EDR (Technical details field) and does not change the message data coding. The flag value can be transmitted for MT message sending. The flag can also be changed with the help of translation rules. | No |
longMessageMode: | Type of long message processing. The following values allowed: cut (trim message text to 140 bytes) - shortens the message leaving only first 140 bytes to be sent. split and split_sar - split the message according to the logics described below. The difference between them is in the header to be used, for split it is UDH header, for split_sar it is sar accordingly. single_id_split - split the message but return the message ID common for all segments payload - message_payload field is used for sending the message text The splitting (options 2/3) depends on the coding: "- dataCoding = 0, 1 or 3: one message can contain up to 160 bytes. If more: segment count = 'message length in symbols / 153 symbols' (or: 'message length in bytes / 153 bytes') - dataCoding 2, 4 - 7: one message can contain up to 140 bytes, if more – segment count = 'message length in symbols / 134 symbols' (or: 'message length in bytes / 134 bytes') - dataCoding 8: one message can contain up to 140 bytes, if more – segment count = 'message length in symbols / 67 symbols' (as 1 symbol occupies 2 bytes, that is: 'message length in bytes / 134 bytes') split_or_payload: serves for sending long messages received over HTTP to SMPP vendors. The mode is not supported if several numbers have been received in the dnis parameter within a single request from the client. When the Send text in payload option is enabled in the vendor channel, the message will be sent in the payload field as a single submit_sm packet. Also, a single delivery report is expected for it, whereas the client will be sent as many reports as the number of received parts. Besides, a single EDR will be written, therefore, the bill by segments option must be set in the client product for correct billing of the client. The default value is "сut". | No |
incMsgId (inc_msg_id) | The client message ID (64 symbols maximum) that can be used for incoming HTTP requests with longMessageMode=cut, longMessageMode=split, longMessageMode=split_sar or no longMessageMode (which equals to longMessageMode=cut). When the SMS switch receives this parameter it will use its value as a client ID. This will allow clients to use their ID to request information on the message if, for example, no routes are available. In case of long messages (when longMessageMode=split or longMessageMode=split_sar), the incoming parameter inc_msg_id will be one and the same for the entire message, whereas the SMS switch will split the message into several parts and use the same ID for each part, adding the part number to each of them. For example, if a message contains two parts and has the incoming message ID is inc_msg_id=1gfc4dd56cbndcj741xs, the SMS switch will process the messages with IDs 1gfc4dd56cbndcj741xs-1 and 1gfc4dd56cbndcj741xs-2. | No |
srcTon, srcNpi, dstTon, dstNpi | the respective parameters for Sender ID and Destination number. Format: integer. Optional | No |
priorityFlag | corresponds to the same name parameter in SMPP. Format: integer. Optional. Allowed values are: 0 and 1 | No |
registeredDelivery | corresponds to the same name parameter in SMPP. Format: integer. Optional. Allowed values are: 0 and 1 | No |
replaceIfPresentFlag | corresponds to the same name parameter in SMPP. Format: integer. Optional. Allowed values are: 0 and 1 | No |
silent | Flag that allows sending silent SMS (message that arrives with no sound and is not displayed on the screen) Allowed values are: 0 and 1, where 0 means NOT silent. Any value other than 0 which has been set explicitly is treated as true, for example, silent=false is interpreted as silent=1. Whether the silent SMS arrives as a silent one to the end user depends on the vendor and the other carriers that handle it. | No |
Response format:
If contentType is not available in the request, and mmsContentUrl does not contain a supported extension, the unsuccessful response will look as follows:
Content Type contains incorrect value |
If mmsContentUrl is not transferred in the report, the unsuccessful response will look as follows:
mmsContentUrl/mms-content-url missing, please define it explicitly in the mmsContentUrl/mms-content-url parameter |