Skip to content

Receiving Whatsapp DLR

Configure Report URL

In order to receive message status reports via a URL, two options are available.

  1. You should include Report URL in the message body parameter report_url.
    {
        "messages": [
            {
                "originator": "{{originator}}",
                "originator_name": "originator_name",
                "recipients": ["{{recipient1}}","{{recipient2}}"],
                "content": {
                "message_type": "TEMPLATE",
                "template": {
                    "template_id": "{{template_id}}",
                    "body_parameter_values": {
                        "0": "first_parameter_in_your_template",
                        "1": "second_parameter_in_your_template"
                    }
                }
            },
            "report_url": "https://the_url_to_recieve_delivery_report.com"
            }
        ]
        }
    
  2. Set Callback URL in dashboard settings

Image title

Additionally, it's important to note that this status postback is sent as json in the POST method.

Delivery Events

Receiving Attributes

On the configured URL, you will receive the following details:

Parameter Value / Pattern Example(s)
event_type Type of the callback data. It includes DELIVERY_EVENTS DELIVERY_EVENTS
timestamp The time in which the event occurred 1695645887348
date The date in which the event occurred 2023-September-25
request_id Request identification number d9835609-a4e0-10ea-a26a-eeafbe700fef
msg_id The message id for each messages in the request 7053a678-75fe-11ed-9e31-0242ac14001c
conversation_type Type of your conversation. It includes marketing, service, utility marketing
message_type Type of the message inside the content. Valid values: TEXT, ATTACHMENT, LOCATION, CONTACTS, TEMPLATE. TEMPLATE
waConvId whatsapp conversation id db311b5709a13ac72c1bd9f293c68625
recipient Destination numbers +971509752xxx
cust_ref A unique id send by the customer for every message
message_tag1-message_tag5 To Specify the message tag
conversation_id Some Optional Conversation ID
originator Sender/Header numbers +971509752xxx
status This is the status of the message, and we have the following statuses: [delivered - Delivered to destination and confirmed], [sent - Was sent to telecom and is awaiting acknowledgement], [scheduled - Message scheduled], [un_delivered - Failed delivery], [processed - message is processed], [rejected - Rejected the message], [insufficient_credit - User does not have enough credit], [read - Read by the user] read
reason Description of your status Read by the user

Example

{
  "event": {
    "event_type": "DELIVERY_EVENTS",
    "timestamp": "1695711356760",
    "date": "2023-September-26"
  },
  "event_content": {
    "message_status": {
      "request_id": "ca40e2bd-640d-4dd6-bd88-513f316ee2e0",
      "msg_id": "ba7eb2f2-5c39-11ee-a0b5-0242ac190005",
      "conversation_type": "service",
      "message_type": "INTERACTIVE",
      "waConvId": "13c2eb731df8097d20a5141b9612be7e",
      "recipient": "+971xx96xx5x3",
      "reference": {
        "cust_ref": "[email protected]",
        "message_tag1": null,
        "message_tag2": null,
        "message_tag3": null,
        "message_tag4": null,
        "message_tag5": null,
        "conversation_id": null
      },
      "originator": "9190xx52xxx4",
      "status": "read",
      "reason": "Read by the user"
    }
  }
}

User Initiated

Receiving Attributes

On the configured URL, you will receive the following details:

Parameter Value / Pattern Example(s)
event_type Type of the callback data. It includes USER_INITIATED DELIVERY_EVENTS
timestamp The time in which the event occurred 1695645887348
date The date in which the event occurred 2023-September-25
recipient Destination numbers +971509752xxx
originator Sender number +971509752xxx
message_type Type of the message inside the content. Valid values: TEXT, ATTACHMENT, LOCATION, CONTACTS, INTERACTIVE. INTERACTIVE
profile_name Whatsapp profile name of sender SMT
text body of whatsapp text message Hi
attachment_type Type of attachment inside the content. Valid values: image, video, sticker, document image
image Image details include caption, mime_type, sha256 and fileLink
video Video details include caption, mime_type, sha256 and fileLink
document Document details include filename, mime_type, sha256 and fileLink
contact List of Contact details include emails, name, org, phones and urls
image Image details includes caption, mime_type, sha256 and fileLink
location Location details includes latitude, longitude

Example

{
  "event": {
    "event_type": "USER_INITIATED",
    "timestamp": "1695625167",
    "date": "2023-September-25"
  },
  "event_content": {
    "message": {
      "originator": "9715xxxx8xx3",
      "recipient": "919xx1xxx5x4",
      "message_type": "TEXT",
      "profile_name": "SMT",
      "text": {
        "body": "Hi"
      }
    }
  }
}