# Send basic message

## Send basic message

> This API is granted only to customers with verified companies after a review compared to the templated API which is granted by default.\
> \
> \## Callback request example (DLR - delivery notification)\
> \
> \### POST /\<callback\_url>\
> \
> \`\`\`json\
> {\
> &#x20; "error": "000",\
> &#x20; "from": "18888112345",\
> &#x20; "message\_id": "8bd71f49-6f42-4729-bf5e-ecf857747633",\
> &#x20; "status": "DELIVERED",\
> &#x20; "to": "16197012345",\
> &#x20; "type": "DLR"\
> }\
> \`\`\`\
> \
> Each request contains the following information:\
> \
> \* \`message\_id\` - the id of the message which has been returned following \`/send\`  request\
> \* \`from\` - the source address the message was sent from\
> \* \`to\` - the destination address which has received the message\
> \* \`status\`- the status of the message\
> &#x20; \* \`DELIVERED\` - Message has been delivered\
> &#x20; \* \`EXPIRED\` - Message wasn't delivered within the 48 hour period\
> &#x20; \* \`UNDELIVERABLE\` - Message wasn't delivered (check the \`error\`)\
> &#x20; \* \`UNKNOWN\` - Message wasn't delivered due to a unknown reason\
> &#x20; \* \`REJECTED\` - Message was rejected by the supplier (check the \`error\`)\
> \* \`type\`- type of the callback, either \`DLR\` for delivery notification or \`MO\` for mobile originated message\
> \* \`error\` - 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>\
> \
> \`\`\`json\
> {\
> &#x20; "from": "16197012345",\
> &#x20; "message\_id": "2d7114a6-bd45-4022-98ab-15d36cc2b9bd",\
> &#x20; "text": "STOP",\
> &#x20; "to": "18888112345",\
> &#x20; "type": "MO"\
> }\
> \`\`\`\
> \
> Each request contains the following information:\
> \
> \* \`message\_id\` - the id of the mobile originated message\
> \* \`from\` - the mobile number the message has been sent from\
> \* \`to\` - the mobile number which has received the message\
> \* \`type\`- type of the callback, either \`DLR\` for delivery notification or \`MO\` for mobile originated message\
> \* \`text\` - the text of the message which has been sent \`from\` to \`to\` number<br>

````json
{"openapi":"3.0.3","info":{"title":"SMS Template API","version":"1.0.0"},"servers":[{"url":"https://messaging-api.bind.hr","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"API key header."}}},"paths":{"/v1.0/send":{"post":{"tags":["Send basic message"],"summary":"Send basic message","description":"This API is granted only to customers with verified companies after a review compared to the templated API which is granted by default.\n\n## Callback request example (DLR - delivery notification)\n\n### POST /<callback_url>\n\n```json\n{\n  \"error\": \"000\",\n  \"from\": \"18888112345\",\n  \"message_id\": \"8bd71f49-6f42-4729-bf5e-ecf857747633\",\n  \"status\": \"DELIVERED\",\n  \"to\": \"16197012345\",\n  \"type\": \"DLR\"\n}\n```\n\nEach request contains the following information:\n\n* `message_id` - the id of the message which has been returned following `/send`  request\n* `from` - the source address the message was sent from\n* `to` - the destination address which has received the message\n* `status`- the status of the message\n  * `DELIVERED` - Message has been delivered\n  * `EXPIRED` - Message wasn't delivered within the 48 hour period\n  * `UNDELIVERABLE` - Message wasn't delivered (check the `error`)\n  * `UNKNOWN` - Message wasn't delivered due to a unknown reason\n  * `REJECTED` - Message was rejected by the supplier (check the `error`)\n* `type`- type of the callback, either `DLR` for delivery notification or `MO` for mobile originated message\n* `error` - The error code returned by the supplier (check the table below for possible values)\n\n| EC   | ERROR DESCRIPTION                                                                                  |\n| ---- | -------------------------------------------------------------------------------------------------- |\n| 0    | DELIVERED                                                                                          |\n| 1    | UNKNOWN_SUBSCRIBER                                                                                 |\n| 5    | UNIDENTIFIED_SUBSCRIBER                                                                            |\n| 9    | ILLEGAL_SUBSCRIBER                                                                                 |\n| 11   | TELESERVICE_NOT_PROVISIONED                                                                        |\n| 13   | CALL_BARRED                                                                                        |\n| 21   | FACILITY_NOT_SUPPORTED                                                                             |\n| 27   | ABSENT_SUBSCRIBER                                                                                  |\n| 31   | SUBSCRIBER_BUSY_FOR_MT_SMS                                                                         |\n| 32   | DELIVERY_FAILURE                                                                                   |\n| 34   | SYSTEM_FAILURE                                                                                     |\n| 36   | UNEXPECTED_DATA_VALUE                                                                              |\n| 37   | MEMORY_CAPACITY_EXCEEDED                                                                           |\n| 38   | PREFIX_NOT_RESOLVED                                                                                |\n| 39   | IMSI_BLACKLISTED                                                                                   |\n| 40   | DEST_ADDRESS_BLACKLISTED                                                                           |\n| 41   | TIME_OUT                                                                                           |\n| 43   | INVALID_ORIGINATOR_ADDRESS                                                                         |\n| 100  | GENERAL_ERROR                                                                                      |\n| 200  | EQUIPMENT_PROTOCOL_ERROR                                                                           |\n| 201  | UNKNOWN_MSC                                                                                        |\n| 202  | CONGESTION_ERROR                                                                                   |\n| 203  | PARAMETER_MISSMATCH                                                                                |\n| 204  | INITIATING_RELEASE                                                                                 |\n| 205  | POTENTIAL_VERSION_INCOMPATIBILITY                                                                  |\n| 206  | REMOTE_NODE_NOT_REACHABLE                                                                          |\n| 207  | MTP_FAILURE                                                                                        |\n| 346  | CLIENT_NETWORK_FORBIDDEN (In a case of MNP being performed)                                        |\n| 351  | INVALID_PREFIX_OR_DESTINATION                                                                      |\n| 4100 | EXPIRED_ON_FORCE_RETRY (When the time to live has been configured for delivery and it has expired) |\n\n## Callback request example (MO - mobile originated message)\n\n### POST /<callback_url>\n\n```json\n{\n  \"from\": \"16197012345\",\n  \"message_id\": \"2d7114a6-bd45-4022-98ab-15d36cc2b9bd\",\n  \"text\": \"STOP\",\n  \"to\": \"18888112345\",\n  \"type\": \"MO\"\n}\n```\n\nEach request contains the following information:\n\n* `message_id` - the id of the mobile originated message\n* `from` - the mobile number the message has been sent from\n* `to` - the mobile number which has received the message\n* `type`- type of the callback, either `DLR` for delivery notification or `MO` for mobile originated message\n* `text` - the text of the message which has been sent `from` to `to` number\n","operationId":"send","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["from","to","text"],"properties":{"from":{"type":"string","description":"Defines which sender name is going to be visible to the customer once the message has been received on the mobile handset","default":"YourCompany"},"to":{"type":"string","description":"Defines a number to which the message is being set","default":"447916123456"},"text":{"type":"string","description":"The message text which is being sent to the mobile handset","default":"Your one time pin code is 123456"},"callback_url":{"type":"string","description":"Optional URL to which updates related to message delivery will be received","default":""}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"oneOf":[{"title":"Accepted","type":"object","properties":{"status":{"type":"string"},"message_id":{"type":"string"},"error_message":{"type":"string"},"cost":{"type":"number"},"count":{"type":"integer"}}},{"title":"Rejected","type":"object","properties":{"status":{"type":"string"},"message_id":{"type":"string"},"error_message":{"type":"string"}}}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"property":{"type":"string"},"error":{"type":"string"}}}}}}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"error_message":{"type":"string"}}}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error_message":{"type":"string"}}}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"error_message":{"type":"string"}}}}}}},"deprecated":false}}}}
````
