Delivery reports on Notify URL

Receive Delivery reports and custom data on your callback server's Notify URL.

Unlike the Getting delivery reports API method, where the reports are pulled and received in the response, you are able to set a Notify URL on your callback server to which we will push the delivery reports.

Notify URL is set as one of the parameters of the Fully-featured textual message API method.

As soon as the delivery reports for sent messages are received in the Infobip system, they will be forwarded to the specified Notify URL on your callback server. Besides the Notify URL, you can also specify notify content type for delivery reports.

Supported content types:

  • application/json
  • application/xml

For every sent message you can set a customized bulk id and message id so each delivery report pushed to the Notify URL will have the same messageId and bulkId attributes as the message for which it is being sent. If you don’t use customized messageId and bulkId, these delivery reports attributes will be generated by the Infobip system.

Apart from the custom bulk id and message id that can identify sent messages, you are able to set callbackData as additional, user defined data that will be sent to the Notify URL. Callback data is also set as one of the parameters of the Fully-featured textual message API method.

The example bellow shows how to set notifyURL and notifyContentType for the delivery report and the user’s callbackData.

POST /sms/1/text/advanced HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/json

{
   "bulkId":"BULK-ID-123-xyz",
   "messages":[
      {
         "from":"InfoSMS",
         "destinations":[
            {
               "to":"41793026727",
               "messageId":"MESSAGE-ID-123-xyz"
            },
            {
               "to":"41793026731"
            }
         ],
         "text":"Mama always said life was like a box of chocolates. You never know what you're gonna get.",
         "notifyUrl":"http://www.example.com/sms/advanced",
         "notifyContentType":"application/json",
         "callbackData":"There's no place like home."
      }
		]
}	
  

The results you will receive on your Notify URL will be the same as Getting delivery reports over the API method, except the XML root element name which is the same for all reports - <reportResponse>.

{
  "results": [
    {
      "bulkId": "BULK-ID-123-xyz",
      "messageId": "c9823180-94d4-4ea0-9bf3-ec907e7534a6",
      "to": "41793026731",
      "sentAt": "2015-06-04T13:01:52.933+0000",
      "doneAt": "2015-06-04T13:02:00.134+0000",
      "smsCount": 1,
      "mccMnc": "21901",
      "price": {
        "pricePerMessage": 0.0001000000,
        "currency": "EUR"
      },
      "status": {
        "groupId": 3,
        "groupName": "DELIVERED",
        "id": 5,
        "name": "DELIVERED_TO_HANDSET",
        "description": "Message delivered to handset"
      },
      "error": {
        "groupId": 0,
        "groupName": "OK",
        "id": 0,
        "name": "NO_ERROR",
        "description": "No Error",
        "permanent": false
      },
      "callbackData":"There's no place like home."
    },
    {
      "bulkId": "BULK-ID-123-xyz",
      "messageId": "MESSAGE-ID-123-xyz",
      "to": "41793026727",
      "sentAt": "2015-06-04T13:01:52.937+0000",
      "doneAt": "2015-06-04T13:02:01.204+0000",
      "smsCount": 1,
      "mccMnc": "21901",
      "price": {
        "pricePerMessage": 0.0001000000,
        "currency": "EUR"
      },
      "status": {
        "groupId": 3,
        "groupName": "DELIVERED",
        "id": 5,
        "name": "DELIVERED_TO_HANDSET",
        "description": "Message delivered to handset"
      },
      "error": {
        "groupId": 0,
        "groupName": "OK",
        "id": 0,
        "name": "NO_ERROR",
        "description": "No Error",
        "permanent": false
      },
      "callbackData":"There's no place like home."
    }
  ]
}	
  

Delivery report push retry cycle

If your Notify URL is unavailable for any reason, forward attempts will be made according to this formula: 1min + (1min * <retryNumber/> * <retryNumber/>). Examples for the first few retry attempts are shown in the table below. Maximum number of retries is 20, i.e. the last retry will be done 41:30h after the initial one. If your URL is not available for the entire time, delivery reports will be lost and the only way you’ll be able to get them is by Getting SMS logs.

Retry number Interval Cumulative
0 01min 00:01h
1 02min 00:03h
2 05min 00:08h
3 10min 00:18h
4 17min 00:35h
5 26min 01:01h
6 37min 01:38h

Delivery report sender IP addresses

In case you need to whitelist our IPs on you system, here is the list of addresses we are using to deliver incoming messages and delivery reports.

  • 193.105.74.58
  • 193.105.74.159
  • 149.5.186.4
  • 197.157.66.28
  • 89.249.23.130
  • 180.179.146.68