post https://messaging-api.bind.hr/v1.0/send
Introduction
The HTTP A2P Messaging API allows the user to initiate the sending of SMS messages to the recipient while specifying the desired content.
Once the SMS has been sent to the subscriber the message delivery status will be received to the callback URL which has been configured by your account manager.
Error codes
When sending the message using the /send
endpoint the following errors can appear within the error
field:
HTTP STATUS 200
status | error_message | description |
---|---|---|
ACCEPTED | OK | The request has been successfully processed |
REJECTED | CLIENT_COUNTRY_FORBIDDEN | The country has been forbidden |
REJECTED | ROUTING_FILTER_INVALID_LENGTH | The "to" number doesn't have the valid length |
REJECTED | ROUTING_PREFIX_FILTER_INVALID_NUMBER | The "to" number doesn't have the valid prefix |
REJECTED | SOURCE_ADDRESS_INVALID | The "from" source address doesn't have a valid value. Alphanumeric: Minimum 2, maximum: 11. Shortcode: Minimum 3, Maximum 9. Numeric: Minimum 9, Maximum: 15 in length |
REJECTED | DESTINATION_ADDRESS_INVALID | The "to" number doesn't have a valid value. Minimum 9, maximum: 15 |
REJECTED | OUT_OF_BALANCE | The client is out of balance |
REJECTED | GENERAL_ERROR | A general error has been encountered |
HTTP STATUS 401 Unauthorized
status | error_message | description |
---|---|---|
REJECTED | CLIENT_DISABLED | The client is not enabled |
REJECTED | PRODUCT_DISABLED | The product has been disabled |
REJECTED | ACCOUNT_DISABLED | The client account has been disabled |
REJECTED | CONNECTION_DISABLED | The client HTTP connection is disabled |
REJECTED | IP_NOT_ALLOWED | The request to the HTTP API has been made from an unauthorized IP |
REJECTED | UNAUTHORIZED | The request was not authorized as the API key is not valid |
REJECTED | GENERAL_ERROR | A general error has been encountered |
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/send
requestfrom
- 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, eitherDLR
for delivery notification orMO
for mobile originated messageerror
- The error code returned by the supplier (check the table below for possible values)
EC | ERROR DESCRIPTION |
---|---|
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>
{
"from": "16197012345",
"message_id": "2d7114a6-bd45-4022-98ab-15d36cc2b9bd",
"text": "STOP",
"to": "18888112345",
"type": "MO"
}
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, eitherDLR
for delivery notification orMO
for mobile originated messagetext
- the text of the message which has been sentfrom
toto
number
Our team can configure different callback URL's for both MO (mobile originated) and DLR (delivery notification) payloads