WhatsApp Client Callback API

Use WhatsApp client callback APIs to receive real-time webhook notifications for incoming messages, template status changes, delivery reports, read reports, and failed delivery reports.

Endpoint details

Client callback APIs deliver events that occur on your WhatsApp Business account to the callback URL you configure in your webhook settings.

Callback type overview

Incoming message callbacks
  • Incoming Text
  • Incoming Image
  • Incoming Audio
  • Incoming Video
  • Incoming Document
  • Incoming Location
  • Incoming Interactive List
  • Incoming Template Quick Reply
  • Incoming Session Quick Reply
Commerce callbacks
  • Session Message Business for Single Product
  • Add Single Product to Cart
  • Add Multi Product to Cart
Status report callbacks
  • Sent/Delivery Report
  • Read Report
  • Failed Delivery Report
Template status logs
  • Template Approved
  • Template Paused
  • Template Disabled
  • Template Deleted

Callback error codes

Callback error codes
CodeTextDescription
400Media download errorThere was an error while downloading media.
401Group does not existThe specified group does not exist.
402OthersAn unspecified error occurred.
403Error code for blacklistingThe given number is blacklisted.
408Message is not validThe message is not valid or malformed.
410Message expiredThe message has expired and cannot be delivered.
429Rate limit hitThe rate limit for API calls has been reached.
430 - 433OthersUnspecified errors occurred.
470Re-engagement messageThe message is a re-engagement message.
471Spam Rate limitThe rate limit for sending spam messages has been reached.
472User's number is part of an experimentThe user's number is part of an experiment and cannot be used.
500Unknown ErrorAn unknown or unexpected error occurred.
1000OthersUnspecified errors occurred.
1001Message too longThe message exceeds the maximum length allowed.
1002Invalid recipient typeThe recipient type specified is not valid.
1003Not a group participantThe user is not a participant of the group.
1004Resource already existsThe resource being created already exists.
1005-1006OthersUnspecified errors occurred.
1008Required parameter is missingA required parameter for the API call is missing.
1009Parameter value is not validThe value provided for a parameter is not valid.
1010Parameter is not requiredA parameter that was provided is not required for the API call.
1011-1011OthersUnspecified errors occurred.
1012Group is unknownThe specified group is unknown.
1013User is not validThe specified user is not valid.
1014Corrupt ImageThe image provided is corrupt or invalid.
1015-1018OthersUnspecified errors occurred.
1019Not a group adminThe user is not an admin of the group.
1020Bad groupThe specified group is invalid or bad.
1021Bad UserThe specified user is invalid or bad.
1022-1024OthersUnspecified errors occurred.
1025Invalid RequestThe API request is invalid.
1026Receiver IncapableThe receiver is incapable of receiving the message.
2000Template Param Count MismatchThe number of parameters provided for a template does not match the required count.
2001Template MissingThe specified template does not exist.
2002Template Fetch FailedFailed to fetch the template.
2003Template Pack MissingThe template pack is missing.
2004Template Param Length Too LongThe length of a parameter in the template is too long.
2005Template Hydrated Text Too LongThe length of the hydrated text in the template is too long.
2006Template White Space Policy ViolatedThe template violates the white space policy.
2007Template Format Character Policy ViolatedThe template violates the format character policy.
2008Template Media Format UnsupportedThe media format in the template is unsupported.
2009Template Required Component MissingA required component in the template is missing.
2010Template Invalid Hydrated URLThe hydrated URL in the template is invalid.
2011Template Invalid Phone NumberThe phone number in the template is invalid.
2012Template Parameter Format MismatchThe format of a parameter in the template is mismatched.
2013Template Buttons UnsupportedThe buttons in the template are unsupported.
0AuthExceptionAn authentication exception occurred.
3API MethodAn error occurred with the API method.
10Permission DeniedThe user does not have the necessary permissions to perform the requested action.
190Access token has expiredThe access token used for authentication has expired.
200-299API PermissionThe API call requires specific permissions, and the user does not have them.
4API Too Many CallsThe API call limit has been exceeded.
80007Rate limit issuesThere are issues with the rate limits for API calls.
130429Rate limit hitThe rate limit for API calls has been reached.
131048Spam rate limit hitThe rate limit for sending spam messages has been reached.
131056(Business Account, Consumer Account) pair rate limit hitThe rate limit for a specific pair of business and consumer accounts has been reached.
368Temporarily blocked for policy violationsThe user or account has been temporarily blocked due to policy violations.
131031Account has been lockedThe user's account has been locked.
1API UnknownAn unknown error occurred with the API.
2API ServiceAn error occurred with the API service.
33Parameter value is not validThe value provided for a parameter is not valid.
100Invalid parameterThe parameter specified in the API call is invalid.
131000Something went wrongAn unspecified error occurred.
131005Access deniedAccess to the requested resource is denied.
131008Required parameter is missingA required parameter for the API call is missing.
131009Parameter value is not validThe value provided for a parameter is not valid.
131016Service unavailableThe requested service is currently unavailable.
131021Recipient cannot be senderThe recipient of the message cannot be the sender.
131026Message UndeliverableThe message could not be delivered to the recipient.
131042Business eligibility payment issueThere is an issue with the payment for business eligibility.
131045Incorrect certificateThe certificate used for authentication is incorrect.
131047Re-engagement messageThe message is a re-engagement message.
131051Unsupported message typeThe message type is not supported.
131052Media download errorThere was an error while downloading media.
131053Media upload errorThere was an error while uploading media.
132000Template Param Count MismatchThe number of parameters provided for a template does not match the required count.
132001Template does not existThe specified template does not exist.
132005Template Hydrated Text Too LongThe length of the hydrated text in the template is too long.
132007Template Format Character Policy ViolatedThe template violates the format character policy.
132012Template Parameter Format MismatchThe format of a parameter in the template is mismatched.
132015Template parameter invalidThe parameter in the template is invalid.
133000Incomplete DeregistrationThe deregistration process is incomplete.
133004Server Temporarily UnavailableThe server is temporarily unavailable.
133005Two-step verification PIN MismatchThe two-step verification PIN provided does not match.
133006Phone number re-verification neededPhone number re-verification is required.
133008Too Many two-step verification PIN GuessesToo many incorrect guesses for the two-step verification PIN.
133009Two-step verification PIN Guessed Too FastThe two-step verification PIN was guessed too quickly.
133010Phone number Not RegisteredThe phone number is not registered.
135000Generic user errorA generic error occurred for the user.

Template status logs

Template status log examples

Template Approved

{
  "product": "whatsapp",
  "component": "whatsapp-callback-event-worker",
  "level": "debug",
  "timestamp": "2023-11-02 07:40:04.402735",
  "message":
  {
    "URL": "xxxxxxxxxxxxxxxxx",
    "data":
    {
      "statuses":
      [
        {
          "id": "xxxxxxxxxxxxxx",
          "template_name": "xxxxx",
          "template_id": xxxxxxxxxxxxxx,
          "template_language": "en",
          "reason": "NONE",
          "status": "APPROVED",
          "timestamp": xxxxxxxx,
          "type": "event",
          "information": null
        }
      ],
      "brand_msisdn": "{phone}"
    },
    "status": 200,
    "response_time": 0.0xxxxxxxxxxxxxx,
    "current_time": "xx:xx:xx.xxxxxx",
    "response": "{"success":true}"
  }
}

Template Paused

{
  "product": "whatsapp",
  "component": "whatsapp-callback-event-worker",
  "level": "debug",
  "timestamp": "2023-11-02 07:37:58.285408",
  "message":
  {
    "URL": "xxxxxxxxxxxxxxxxxxxxx",
    "data":
    {
      "statuses":
      [
        {
          "id": "xxxxxxxxxxxxxxx",
          "template_name": "abc__1",
          "template_id": xxxxxxxxxxxxxxx,
          "template_language": "en",
          "reason": "NONE",
          "status": "PAUSED",
          "timestamp": xxxxxxxxxx,
          "type": "event",
          "information":
          {
            "title": "FIRST_PAUSE",
            "description": "Your WhatsApp message template has been paused for x hours until xxx x at xx:xx AM UTC because it had issues."
          }
        }
      ],
      "brand_msisdn": "{phone}"
    },
    "status": 200,
    "response_time": 0.0xxxxxxxxxxxxxxx,
    "current_time": "xxxx-xx-xx xx:xx:xx.xxxxxx",
    "response": "{"success":true}"
  }
}

Template Disabled

{
  "product": "whatsapp",
  "component": "whatsapp-callback-event-worker",
  "level": "debug",
  "timestamp": "2023-11-02 09:57:45.920074",
  "message":
  {
    "URL": "xxxxxxxxxxxxxxxxxxxxxx",
    "data":
    {
      "statuses":
      [
        {
          "id": "xxxxxxxxxxxxxxxxx",
          "template_name": "xxxxxxxxxxxxxxx",
          "template_id": xxxxxxxxxxxxxx,
          "template_language": "en_US",
          "reason": "NONE",
          "status": "FLAGGED",
          "timestamp": xxxxxxxxxx,
          "type": "event",
          "information": null
        }
      ],
      "brand_msisdn": "xxxxxxxxxxxxx"
    },
    "status": 200,
    "response_time": 0.011070728302001953,
    "current_time": "xxxx-xx-xx xx:xx:xx.xxxxxx",
    "response": "{"status":"ok"}\n"
  }
}

Template Deleted

{
  "product": "whatsapp",
  "component": "whatsapp-callback-event-worker",
  "level": "debug",
  "timestamp": "2023-11-02 10:36:44.798440",
  "message":
  {
    "URL": "xxxxxxxxxxxxxxxxxxxxxxxx",
    "data":
    {
      "statuses":
      [
        {
          "id": "xxxxxxxxxxxxxxxx",
          "template_name": "testing_02_2023",
          "template_id": xxxxxxxxxxxxxx,
          "template_language": "en_US",
          "reason": "NONE",
          "status": "PENDING_DELETION",
          "timestamp": xxxxxxxxxxx,
          "type": "event",
          "information": null
        }
      ],
      "brand_msisdn": "{phone}"
    },
    "status": 200,
    "response_time": 0.0xxxxxxxxxxxxxxxxxx,
    "current_time": "xxxx-xx-xx xx:xx:xx.xxxxxx",
    "response": "{"status":"ok"}\n"
  }
}

Callback payload examples

Callback payload examples

1). Incoming Text:

Request Samples

{
  "messages": [
    {
      "id": "6af19ee2-72d9-11ed-88f4-0a58a9fxxxx2",
      "from": "91704534xxx5",
      "type": "text",
      "timestamp": "1670051363",
      "text": {
        "body": "Hi"
      },
      "message_id": "wamid.HBgMOTE3MDQ1MzQ1Mjg1FQIAEhggNEI0OUxxxxxxxxxxxzUxOEVGODBDMEE2QUFCQTg1ODkA"
    }
  ],
  "contacts": [
    {
      "profile": {
        "name": "Darryl"
      },
      "wa_id": "{phone}"
    }
  ],
  "brand_msisdn": "{phone}",
  "request_id": "6af19ee2-72d9-11ed-88f4-0a58xxxxxc02"
}

Request Body schema: application/json

  • messages (Array of objects) — An array of message objects that contains information about the incoming text message and its parameters.
  • timestamp (string) — The Unix timestamp of the message.
  • text (object) — An object that contains the text of the message. The text message includes a single parameter, body, which contains the text of the message.
  • message_id (string) — The unique ID for the message that was generated by WhatsApp.
  • contacts (Array of objects) — An array of contact objects that contains information about the sender of the message and its parameters.
  • wa_id (string) — The WhatsApp ID of the contact.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.
  • request_id (string) — A unique ID for the callback request.

2). Incoming Image:

Request Samples

{
  "apiKey": "IfgKh@jHkB5%232roUt20nhVgfb!ll*mxxxxxx",
  "messages": [
    {
      "from": "{phone}",
      "id": "ABGGFlA5FpafAgoxxxxxxxxxmuxx",
      "image": {
        "file": "/usr/local/wamedia/shared/b1cf38-8734-4ad3-b4a1-ef0c10d0xxxx",
        "id": "b1c68f38-8734-4ad3-b4a1-ef0c10xxxx",
        "mime_type": "image/jpeg",
        "sha256": "29ed500fa64eb55fc19dc4124acb300e5dcca301ae99xxxxx",
        "caption": "Check out my new phone!",
        "media_url": "https://apis.rmlconnect.net/wba/v1/media?media_id=fc233119-733f-49c-bcbd-bxxxxxxxxxxx&username=demo"
      },
      "timestamp": "1521497954",
      "type": "image"
    }
  ],
  "brand_msisdn": "{phone}",
  "request_id": "aebeca32-f125-11eb-8c86-0242ac1xxxxx"
}

Request Body schema

apiKey

string

The API key to authenticate the callback request.

  • messages (Array of objects) — An array of message objects that contains information about the incoming image message and its parameters. Array
  • from (string) — The phone number of the sender in international format.
  • id (string) — A unique ID for the message.
  • image (object) — An object that contains information about the incoming image.
  • timestamp (string) — The timestamp of the incoming message.
  • type (string) — The type of the incoming message. In this case, "image".
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.
  • request_id (string) — A unique ID for the callback request.

3). Incoming Audio:

Request Samples

{
  "messages": [
    {
      "from": "{phone}",
      "id": "ABGGFlA5FpafAgo6tHcNmNjxxxxx",
      "timestamp": "1521827831",
      "type": "voice",
      "voice": {
        "file": "/usr/local/wamedia/shared/463e/b7ec/ff4e4d9bb11cbdxxxxx",
        "id": "463eb7ec-ff4e-4d9b-b110-1879cbdxxxxx",
        "mime_type": "audio/ogg; codecs=opus",
        "sha256": "fa9e1807d936b7cebe63654ea3a7912923590521efxxxxxxx",
        "media_url": "https://apis.rmlconnect.net/wba/v1/media?media_id=fc233119-733f-49c-bcbd-b2f68f7xxxxx&username=demo"
      }
    }
  ],
  "brand_msisdn": "{phone}",
  "request_id": "aebeca32-f125-11eb-8c86-0242acxxxxxx"
}

Request Body schema

  • messages (Array of objects) — An array of message objects that contains information about the incoming audio message and its parameters. Array
  • from (string) — The phone number of the sender.
  • id (string) — A unique ID for the message.
  • timestamp (string) — The Unix timestamp of the message.
  • type (string) — The type of message. For example, text, image, video, and so on.
  • voice (object) — An object that contains the audio message parameters.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.
  • request_id (string) — A unique ID for the callback request.

4). Incoming Video:

Request Samples

{
  "messages": [
    {
      "from": "{phone}",
      "id": "ABGGFlA5FpafAgo6tHcNmNjxxxxx",
      "timestamp": "1521827831",
      "type": "voice",
      "voice": {
        "file": "/usr/local/wamedia/shared/463e/b7ec/ff4e4d9bb11cbdxxxxx",
        "id": "463eb7ec-ff4e-4d9b-b110-1879cbdxxxxx",
        "mime_type": "audio/ogg; codecs=opus",
        "sha256": "fa9e1807d936b7cebe63654ea3a7912923590521efxxxxxxx",
        "media_url": "https://apis.rmlconnect.net/wba/v1/media?media_id=fc233119-733f-49c-bcbd-b2f68f7xxxxx&username=demo"
      }
    }
  ],
  "brand_msisdn": "{phone}",
  "request_id": "aebeca32-f125-11eb-8c86-0242acxxxxxx"
}

Request Body schema

  • messages (Array of objects) — An array of message objects that contains information about the incoming video message and its parameters. Array
  • from (string) — The phone number of the sender.
  • id (string) — A unique ID for the message.
  • timestamp (string) — The Unix timestamp of the message.
  • type (string) — The type of message. For example, text, image, video, and so on.
  • voice (object) — An object that contains the audio message parameters.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.
  • request_id (string) — A unique ID for the callback request.

5). Incoming Document:

Request Samples

{
  "apiKey": "IfgKh@jHkB5%232roUt20nhVgfb!ll*mvxxxxx",
  "messages": [
    {
      "from": "{phone}",
      "id": "ABGGFlA5FpafAgo6tHcNmNjXxxxx",
      "timestamp": "1522189546",
      "type": "document",
      "document": {
        "caption": "80skaraokesonglistaxxxst",
        "file": "/usr/local/wamedia/shared/fc233119-733f-49c-bcbd-b2f68f79xxxx",
        "id": "fc233119-733f-49c-bcbd-b2f68f7xxxxx",
        "mime_type": "application/pdf",
        "sha256": "3b11fa6ef2bde1dd14726e09d3eda220f6484f32d5d5caa4xxx",
        "media_url": "https://apis.rmlconnect.net/wba/v1/media?media_id=fc233119-733f-49c-bcbd-b2f6xxxxxxxx&username=demo"
      }
    }
  ],
  "brand_msisdn": "971445xxxxx",
  "request_id": "aebeca32-f125-11eb-8c86-0242ac1xxxxx"
}

Request Body schema

apiKey

string

The API key to authenticate the callback request.

  • messages (Array of objects) — An array of message objects that contains information about the incoming document and its parameters. Array
  • from (string) — The phone number of the sender.
  • id (string) — A unique ID for the message.
  • timestamp (string) — The Unix timestamp of the message.
  • type (string) — The type of the message, which is "document" for incoming documents.
  • document (object) — An array of contact objects that contains the details of the incoming document message.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.
  • request_id (string) — A unique ID for the callback request.

6). Incoming Location:

Request Samples

{
  "contacts": [
    {
      "profile": {
        "name": "User Name"
      },
      "wa_id": "{phone}"
    }
  ],
  "messages": [
    {
      "from": "{phone}",
      "id": "ABGGFlA5FpafAgo6tHcNmNjxxxxx",
      "location": {
        "address": "Main Street Beach, Santa Cruz, CA",
        "latitude": 38.9806263495,
        "longitude": -131.9428612257,
        "name": "Main Street Beach",
        "url": "https://foursquare.com/v/xxxxxxx35b5df7744"
      },
      "timestamp": "1521497875",
      "type": "location"
    }
  ],
  "brand_msisdn": "{phone}",
  "request_id": "aebeca32-f125-11eb-8c86-0242ac12xxxx"
}

Request Body schema

  • contacts (Array of objects) — An array of contact objects that contains information about the sender of the message and its parameters. Array
  • profile (object) — An object that contains the contact's profile information, such as, name, photo, and so on.
  • name (string) — The contact's profile name.
  • wa_id (string) — The WhatsApp ID of the contact.
  • messages (Array of objects) — An array of message objects that contains information about the incoming message location and its parameters. Array
  • from (string) — The phone number of the sender.
  • id (string) — A unique ID for the message.
  • location (object) — An object that contains the location of the message. The location message include parameters.
  • address (string) — The address of the sender.
  • latitude (number) — The latitude coordinates of the location.
  • longitude (number) — The longitude coordinates of the location.
  • name (string) — The name of the location.
  • url (string) — The URL of the location (if available).
  • timestamp (string) — The Unix timestamp of the message.
  • type (string) — The type of message. For example, text, image, video, and so on.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.
  • request_id (string) — A unique ID for the callback request.

7). Incoming Interactive List:

Request Samples

{
  "contacts": [
    {
      "profile": {
        "name": "overw@tch"
      },
      "wa_id": "91704527xxxx"
    }
  ],
  "messages": [
    {
      "context": {
        "from": "91932182xxxx",
        "id": "gBEGkXBFJzZxAgmfF7hnuD9xxxx"
      },
      "from": "91704527xxxx",
      "id": "b398502a-eea8-11eb-ac2a-0242ac12xxxx",
      "interactive": {
        "list_reply": {
          "description": "yummy flavour",
          "id": "rd133",
          "title": "Fish Masala"
        },
        "type": "list_reply"
      },
      "timestamp": "1627369389",
      "type": "interactive"
    }
  ],
  "brand_msisdn": "91932182xxxx",
  "request_id": "b398502a-eea8-11eb-ac2a-0242ac12xxxx"
}

Request Body schema

  • contacts (Array of objects) — An array of contact objects that contains information about the sender of the interactive list and its parameters. Array
  • profile (object) — An object that contains the contact's profile information, such as, name, photo, and so on.
  • name (string) — The profile name.
  • wa_id (string) — The WhatsApp ID of the contact.
  • messages (Array of objects) — An array of message objects that contains information about the incoming interactive list and its parameters. Array
  • context (object) — The context of the message.
  • from (string) — The phone number of the sender.
  • id (string) — A unique ID for the interactive list.
  • from (string) — The phone number of the sender.
  • id (string) — A unique ID for the interactive list.
  • interactive (object) — An array of message objects that contains the details of the interactive message.
  • list_reply (object) — The message contains information about a list reply interaction.
  • description (string) — The description of the item.
  • id (string) — A unique ID for the interactive list.
  • title (string) — The interactive list title.
  • type (string) — The type of a reply interaction, which is "list_reply" in this case.
  • timestamp (string) — The Unix timestamp of the message.
  • type (string) — The type of the message.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.
  • request_id (string) — A unique ID for the callback request.

8). Incoming Template Quick Reply:

Request Samples

{
  "contacts": [
    {
      "profile": {
        "name": "@@"
      },
      "wa_id": "91869388xxxx"
    }
  ],
  "messages": [
    {
      "button": {
        "text": "Buy Now"
      },
      "context": {
        "from": "91120681xxxx",
        "id": "b7e984f4-94ad-11ec-b1f4-0a58a9fezxxx"
      },
      "from": "91869388xxxx",
      "id": "d14b9dce-94ad-11ec-ad15-0242ac1xxxxx",
      "timestamp": "1645623480",
      "type": "button"
    }
  ],
  "brand_msisdn": "91120681xxxx",
  "request_id": "d14b9dce-94ad-11ec-ad15-0242ac12xxxx"
}

Request Body schema

  • contacts (Array of objects) — An array of contact objects that contains information about the sender of the message and its parameters. Array
  • profile (object) — An object that contains the contact's profile information, such as, name, photo, and so on.
  • name (string) — The name of the contact.
  • wa_id (string) — The WhatsApp ID of the contact.
  • messages (Array of objects) — An array of message objects that contains information about the message and its parameters. Array
  • button (object) — An object that represents the quick reply button with "text" field.
  • text (string) — The text that is displayed on the button.
  • context (object) — An object that represents the context of the message.
  • from (string) — The WhatsApp ID of the contact.
  • id (string) — The ID of the message.
  • from (string) — The WhatsApp ID of the contact.
  • id (string) — The ID of the message.
  • timestamp (string) — The Unix timestamp of the message.
  • type (string) — The type of the message, which is "button" for quick reply messages.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.
  • request_id (string) — A unique ID for the callback request.

9). Incoming Session Quick Reply:

Request Samples

{
  "contacts": [
    {
      "profile": {
        "name": "overw@tch"
      },
      "wa_id": "917045xxxxxx"
    }
  ],
  "messages": [
    {
      "context": {
        "from": "9193218xxxxx",
        "id": "gBEGkXBFJzZxAgnSloIcxxxxxxo"
      },
      "from": "91704527xxxx",
      "id": "c5e396fe-eea8-11eb-9e4e-0242ac12xxxx",
      "interactive": {
        "button_reply": {
          "id": "aaaa",
          "title": "Yes"
        },
        "type": "button_reply"
      },
      "timestamp": "1627369420",
      "type": "interactive"
    }
  ]
}

Request Body schema

  • contacts (Array of objects) — An array of contact objects that contains information about the sender of the message and its parameters. Array
  • profile (object) — An object that contains the contact's profile information, such as, name, photo, and so on.
  • name (string) — The name of the contact.
  • wa_id (string) — The WhatsApp ID of the contact.
  • messages (Array of objects) — An array of message objects that contains information about the message and its parameters. Array
  • context (object) — An object that represents the context of the message.
  • from (string) — The WhatsApp ID of the contact.
  • id (string) — The ID of the message and the WhatsApp ID of the sender.
  • from (string) — The WhatsApp ID of the contact.
  • id (string) — The ID of the message.
  • interactive (object) — A JSON object representing the interactive message, with a button_reply field containing the ID and title of the button that was clicked and a type field set to "button_reply".
  • button_reply (object) — The button reply text.
  • id (string) — The ID of the button.
  • title (string) — The title of the button.
  • type (string) — A string indicating the type of the message, which is set to "interactive" for an incoming session quick reply.
  • timestamp (string) — A string indicating the type of the message, which is set to "interactive" for an incoming session quick reply.
  • type (string) — The type of the message.

10). Session Message Business for Single Product:

Request Samples

{
  "contact_no": "97150852xxxx",
  "data": {
    "contacts": [
      {
        "profile": {
          "name": "Justin Joy"
        },
        "wa_id": "9198330xxxxx"
      }
    ],
    "messages": [
      {
        "context": {
          "referred_product": {
            "catalog_id": "965968xxxxxxxx2",
            "product_retailer_id": "2xxxxxx1"
          }
        },
        "from": "91983302xxxx",
        "id": "ABEGkZgxxxxxxxxxxxxxFkqiBiDQ",
        "text": {
          "body": "Hi"
        },
        "timestamp": "1655377850",
        "type": "text"
      }
    ],
    "brand_msisdn": "9715085xxxxx"
  },
  "time": "2022-06-16 11:10:50.560600",
  "source": "FROM_CALLBACK"
}

Request Body schema

  • contact_no (string) — The phone number of the WhatsApp user who sent the message.
  • data (object) — A JSON object containing the message data.
  • contacts (Array of objects) — An array of contact objects that contains an array of WhatsApp contacts for whom the message is intended. Array
  • profile (object) — An object that contains the contact's profile information, such as, name, photo, and so on.
  • name (string) — The name of the contact.
  • wa_id (string) — The WhatsApp ID of the contact.
  • messages (Array of objects) — An array of message objects that contains information about the incoming text message and its parameters. Array
  • context (object) — An object that represents the context of the message; that is the information about the referred product.
  • referred_product (object) — An object that represents the referred product.
  • catalog_id (string) — The ID of the catalog the product belongs to.
  • product_retailer_id (string) — The ID of the retailer selling the product.
  • from (string) — The phone number of the sender.
  • id (string) — A unique ID for the message.
  • text (object) — An object that contains the text of the message.
  • timestamp (string) — The Unix timestamp of the message.
  • type (string) — The type of message, which is image.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.
  • time (string) — The timestamp of the message in the format YYYY-MM-DD HH:MM:SS.mmmmmm.
  • source (string) — The source of the message, which will be "FROM_CALLBACK" in this case.

11). Add Single Product to Cart:

Request Samples

{
  "contact_no": "97150852xxxxx",
  "data": {
    "contacts": [
      {
        "profile": {
          "name": "Justin Joy"
        },
        "wa_id": "91983302xxxx"
      }
    ],
    "messages": [
      {
        "from": "91983302xxxx",
        "id": "ABEGkZgzAxxxxxxxxxxxxxxJmt4T",
        "order": {
          "catalog_id": "9659687340xxxxx",
          "product_items": [
            {
              "currency": "AED",
              "item_price": 54,
              "product_retailer_id": "20214xxx",
              "quantity": 1
            }
          ]
        },
        "timestamp": "1655377900",
        "type": "order"
      }
    ],
    "brand_msisdn": "97150852xxxx"
  },
  "time": "2022-06-16 11:11:41.204321",
  "source": "FROM_CALLBACK"
}

Request Body schema

  • contact_no (string) — The phone number of the WhatsApp user who initiated the action.
  • data (object) — A JSON object containing the message data.
  • contacts (Array of objects) — An array of JSON objects representing the contacts involved in the interaction. Array
  • profile (object) — An object that contains the contact's profile information, such as, name, photo, and so on.
  • name (string) — The name of the contact.
  • wa_id (string) — The WhatsApp ID of the contact.
  • messages (Array of objects) — An array of JSON objects representing the messages sent during the interaction. Array
  • from (string) — The phone number of the sender.
  • id (string) — A unique ID for the message.
  • order (object) — An object that contains the details of the product added to the cart by the user.
  • catalog_id (string) — The ID of the catalog the product belongs to.
  • product_items (Array of objects) — An array of product item objects that contains the details of the product added to the cart. Array
  • currency (string) — The currency of the product item.
  • item_price (integer) — The price of the product item.
  • product_retailer_id (string) — The ID of the retailer selling the product.
  • quantity (integer) — The quantity of the product item being added to the cart.
  • timestamp (string) — The Unix timestamp of the message.
  • type (string) — The type of message, which is "order" in this case.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.
  • time (string) — The timestamp of the message in the format YYYY-MM-DD HH:MM:SS.mmmmmm.
  • source (String) — The source of the message, which will be "FROM_CALLBACK" in this case.

12). Add Multi Product to Cart:

Request Samples

{
  "contact_no": "9715085xxxxx",
  "data": {
    "contacts": [
      {
        "profile": {
          "name": "Justin Joy"
        },
        "wa_id": "9198330xxxxx"
      }
    ],
    "messages": [
      {
        "from": "91983302xxxx",
        "id": "ABEGkZgzAmlUAgo635UDWxqRxxxx",
        "order": {
          "catalog_id": "9659687340xxxxx",
          "product_items": [
            {
              "currency": "AED",
              "item_price": 54,
              "product_retailer_id": "20xxxx01",
              "quantity": 1
            },
            {
              "currency": "AED",
              "item_price": 40,
              "product_retailer_id": "206xxx00",
              "quantity": 1
            }
          ]
        },
        "timestamp": "1655377983",
        "type": "order"
      }
    ],
    "brand_msisdn": "97150852xxxx"
  },
  "time": "2022-06-16 11:13:03.900579",
  "source": "FROM_CALLBACK"
}

Request Body schema

  • contact_no (string) — The phone number of the WhatsApp user who initiated the action.
  • data (object) — A JSON object containing the message data.
  • contacts (Array of objects) — An array of JSON objects representing the contacts involved in the interaction. Array
  • profile (object) — An object that contains the contact's profile information, such as, name, photo, and so on.
  • name (string) — The name of the contact.
  • wa_id (string) — The WhatsApp ID of the contact.
  • messages (Array of objects) — An array of JSON objects representing the messages sent during the interaction. Array
  • from (string) — The phone number of the sender.
  • id (string) — A unique ID for the message.
  • order (object) — An object that contains the details of the product added to the cart by the user.
  • catalog_id (string) — The ID of the catalog the product belongs to.
  • product_items (Array of objects) — An array of product item objects that contains the details of the product added to the cart. Array
  • currency (string) — The currency of the product item.
  • item_price (integer) — The price of the product item.
  • product_retailer_id (string) — The ID of the retailer selling the product.
  • quantity (integer) — The quantity of the product item being added to the cart.
  • timestamp (string) — The Unix timestamp of the message.
  • type (string) — The type of message, which is "order" in this case.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.
  • time (string) — The timestamp of the message in the format YYYY-MM-DD HH:MM:SS.mmmmmm.
  • source (string) — The source of the message, which will be "FROM_CALLBACK" in this case.

13). Sent/Delivery Report:

Request Samples

{
  "statuses": [
    {
      "conversation": {
        "expiration_timestamp": 1644060900,
        "id": "d24f4c6e3xxxxxxxxxxxfcbd2822fa6a",
        "origin": {
          "type": "user_initiated/business_initiated/referral_conversion"
        }
      },
      "id": "5a9f3040-85ae-11ec-8168-0xxxxxxxxxxx",
      "pricing": {
        "billable": "true/false",
        "category": "user_initiated/business_initiated/referral_conversion",
        "pricing_model": "CBP"
      },
      "recipient_id": "91986006xxxx",
      "status": "sent/delivered",
      "timestamp": "1643974443",
      "type": "message",
      "extra": "",
      "message_id": "wamid.HBgMOTE3MDQ1MzxxxxxxxxxxxxxxxxxxxxxxxxxxNDA5QzRGRkRFAA=="
    }
  ],
  "brand_msisdn": "917428182xxx"
}

Request Body schema

  • statuses (Array of objects) — An array containing information about the message status. Array

  • conversation (object) — Information about the conversation.

  • expiration_timestamp (integer) — The timestamp for when the conversation expires.

  • id

  • string

  • The ID of the conversation. For example, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

  • origin

  • object

Information about the origin of the conversation.

  • type (string) — The type of origin. Possible values are "user_initiated", "business_initiated", or "referral_conversion".
  • id (string) — A unique ID for the message.
  • pricing (object) — Information about the pricing for the message.
  • recipient_id (string) — The ID of the recipient.
  • status (string) — The status of the message. Possible values are "sent" or "delivered".
  • timestamp (string) — The timestamp for the message.
  • type (string) — The type of message.
  • extra (string) — Any extra information about the message.
  • message_id (string) — The ID of the message.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.

14). Read Report:

Request Samples

{
  "display_no": "91932182xxxx",
  "statuses": [
    {
      "id": "f8c7302e-4dfe-11ed-9b08-0xxxxxxxxxx2",
      "recipient_id": "xxxxxxxxxxxx",
      "status": "read",
      "timestamp": "1665999302",
      "type": "message",
      "conversation": {
        "id": "a58efe0xxxxxxxxxxx3b3015e1573769",
        "origin": {
          "type": "user_initiated/business_initiated/referral_conversion"
        }
      },
      "pricing": {
        "billable": "true/false",
        "pricing_model": "CBP",
        "category": "user_initiated/business_initiated/referral_conversion"
      },
      "extra": "{your value}"
    }
  ],
  "brand_msisdn": "91932182xxxx"
}

Request Body schema

  • display_no (string) — The phone number of the WhatsApp Business Account in E.164 format.
  • statuses (Array of objects) — An array of status objects representing the read status of the messages. Array
  • id (string) — A unique identifier for the message.
  • recipient_id (string) — The WhatsApp ID of the recipient who has read the message.
  • status (string) — The status of the message, which is "read" in this case.
  • timestamp (string) — The timestamp in seconds when the message was read.
  • type (string) — The type of the message, which is "message" in this case.
  • conversation (object) — An object containing information about the conversation where the message was read.
  • id (string) — A unique identifier for the conversation.
  • origin (object) — An object representing the origin of the conversation.
  • type (string) — The type of the conversation origin, which can be "user_initiated", "business_initiated", or "referral_conversion".
  • pricing (object) — An object representing the pricing information for the message.
  • billable (string) — A boolean value indicating whether the message is billable or not.
  • pricing_model (string) — The pricing model for the message, which is "CBP" in this case.
  • category (string) — The category of the conversation origin, which can be "user_initiated", "business_initiated", or "referral_conversion".
  • extra (string) — A string containing additional metadata for the message.
  • brand_msisdn (string) — The phone number associated with the WhatsApp Business account in international format.

15). Failed Delivery Report:

Request Samples

{
  "statuses": [
    {
      "errors": [
        {
          "code": 470,
          "title": "reason for failure"
        }
      ],
      "id": "c58c55a6cae6d1cb43d0c37efxxxxxb",
      "recipient_id": "1206400xxxx",
      "status": "failed",
      "timestamp": "1533332775",
      "extra": "qwkfm9_606hxxx05"
    }
  ]
}

Request Body schema

  • statuses (Array of objects) — An array of JSON objects that represent the status of the messages sent. Array
  • errors (Array of objects) — An array of JSON objects that represent the errors that occurred during the message delivery process. Array
  • code (integer) — A numeric error code that indicates the type of error that occurred.
  • title (string) — A human-readable description of the error that occurred.
  • id (string) — A unique identifier for the message that was sent.
  • recipient_id (string) — The WhatsApp ID of the recipient who failed to receive the message.
  • status (string) — A string that indicates the status of the message delivery. For Failed Delivery Report, the status is "failed".
  • timestamp (string) — The Unix timestamp (in seconds) when the message delivery failed.
  • extra (string) — An optional field for adding custom data.

Responses

200 Success

The callback endpoint should return HTTP 200 when the callback is received successfully.



Did this page help you?