create Delivery Info Subscription
Subscribe for delivery info notifications. This is an alternative way to the Get Delivery Infos method to retrieve delivery infos.
A delivery infos will be sent to the specified URL whenever the message's state changes. You will typically receive 2 notifications with the states DeliveredToNetwork and DeliveredToTerminal respectively for each sent message. For large messages that are split into parts, you will receive one notification for the first part with the state DeliveredToTerminal.
Be aware that
- There is no retry mechanism on the delivery notifications. If we fail to send the notification to your URL (e.g. 404 not found, timeout, network issues) we will not send it again.
- The notifications might arrive in random order. You might receive the DeliveredToTerminal before the DeliveredToNetwork notification. This requires you to build some logic on your end to not simply overwrite the state DeliveredToTerminal with DeliveredToNetwork and wronfully conclude that the message is still in the state DeliveredToNetwork.
- You can have only one subscription.
/outbound/subscriptions
Usage example:
Request
POST /outbound/subscriptions HTTP/1.1
Host: opensms.api.bics.com
Authorization: Bearer MY_API_KEY
Content-type: application/json
Content-length: 106
{
"callback": {
"url": "https://your.domain/sms/callback",
"securityToken": "r2k5hq3"
}
}
Response
HTTP/1.1 201 Created
Parameters
Body
{
"callback": {
"url": "https://your.domain/sms/callback",
"securityToken": "r2k5hq3"
}
}
Responses
Status: 201
subscription created
Status: 400
The request is not well formed.
Status: 406
The request is not accepted.