SMS HTTP API
Sending an SMS message
Request
POST/GET https://api.unibell.tech/sms_new?X-Authorization=AccessKey
d8ac9959r12b43545XXXXX&destAddr=7917XXXXXXX&sourceAddr=XXXXX&short Message=Hi, how are you?
Parameter | Type | Description |
---|---|---|
destAddr | string | The phone number to which the SMS message is sent, in e.164 format, for the Russian Federation 7XXXXXXXXXX |
sourceAddr | string | Sender’s name |
shortMessage | string | Message text |
Response
{
“reference”: “5b922bba6be053cd6a2ecebb1a31438a”,
“status”: “ok”,
}
Parameter | Type | Description |
---|---|---|
status | string | Request status, see above |
reference | string | Unique message ID |
To get the results of the request execution, a callback
over the HTTP/HTTPS protocol can be configured using the POST method. The parameters are passed Content-Type: application/x-www-form-urlencoded.
Parameter | Type | Description |
---|---|---|
reference | string | Unique message ID |
sourceAddr | string | Sender’s name |
destAddr | string | The phone number to which the SMS message is sent, in e.164 format, for the Russian Federation 7XXXXXXXXXX |
status | string | SMS Message Status DELIVERED — delivered UNDELIVERABLE — not delivered (clarification in networkErrorCode) REJECTED — rejected with an error(clarification in networkErrorCode) |
networkErrCode | string | SS7 errors, see below |
imsi | string | Subscriber’s IMSI |
vlr | string | Subscriber’s VLR |
hlr | string | Subscriber’s HLR |
createdDateTime | string | Date\time of creation |
statusDateTime | string | Date\time of status receipt |
Error codes in the status
Possible error codes in the status of SMS messages or HLR requests (values of networkErrCode), all unspecified codes are considered vendor specific and are not processed separately:
Code | Name | Description |
---|---|---|
0 | No error | The subscriber exists and is available. |
1 | The subscriber does not exist | The specified phone number does not exist. |
6 | The subscriber is offline | The subscriber’s phone is disconnected or is out of range of the network. |
11 | No SMS service | Means that the subscriber cannot receive the SMS message. For example, the service is not connected, or the subscriber is roaming, where message reception is not activated, or the subscriber’s operator does not have an SMS exchange with the current roaming operator. It can also be a landline number without receiving messages. |
12 | Error in the subscriber’s phone | The message cannot be delivered to the subscriber due to an error in the telephone or SIM card. |
13 | The subscriber is blocked | Occurs, for example, if the subscriber’s account has a zero or negative balance, and he is roaming, or blocked by the operator for prolonged non-payment or voluntarily by the subscriber himself. Also, this error may return if the SIM card is damaged or the PIN and PUK codes of the SIM card are entered incorrectly. |
21 | No service support | The subscriber’s device does not support working with this service (service). |
On this page