Whatsapp webbooks
You will receive the following webhook Notification callbacks:

1. Notification syntax

2. Text message

3. Reaction Message

4. Media Message

5. Location Message

6. Contacts Message

7. Interactive Message

7. Status Updates

Configure your webbook from: Whatsapp > settings

Notification Callbacks from the Sozuri OmniChannel Whatsapp API

All whatsapp notification Callbacks use the following object format.

{
    "project" : "YOUR_PROJECT_NAME",
    "channel": "whatsapp",
    "to": "BUSINESS_PHONE_NUMBER",
    "messages": [{
          "from": PHONE_NUMBER,
          "message_id": "wamid.ID",
          "timestamp": TIMESTAMP,
          "type": "",
          # specific Webhooks payload            
        }]
    
  }

{
  "project" : "YOUR_PROJECT_NAME",
  "channel": "whatsapp",
  "to": "BUSINESS_PHONE_NUMBER",
  "messages": [{
        "from": PHONE_NUMBER,
        "message_id": "MESSAGE_ID",
        "timestamp": TIMESTAMP,
        "type": "text",
        "text": {
          "body": "MESSAGE_BODY"
        }
      }]
}
{
  "project" : "YOUR_PROJECT_NAME",
  "channel": "whatsapp",
  "to": "BUSINESS_PHONE_NUMBER",
  "messages": [{
        "from": PHONE_NUMBER,
        "message_id": "MESSAGE_ID",
        "timestamp": TIMESTAMP,
        "type": "reaction",
        "reaction": {
            "message_id": "MESSAGE_ID",
            "emoji": "EMOJI"
          }
      }]
}

{
  "project" : "YOUR_PROJECT_NAME",
  "channel": "whatsapp",
  "to": "BUSINESS_PHONE_NUMBER",
  "messages": [{
        "from": PHONE_NUMBER,
        "message_id": "wamid.ID",
        "timestamp": TIMESTAMP,
        "type": "image",
        "image": {
          "caption": "CAPTION",
          "mime_type": "image/jpeg",
          "sha256": "IMAGE_HASH",
          "id": "ID"
        }
      }]
}


//When you receive a sticker, you will get the following notification:
{
    "project" : "YOUR_PROJECT_NAME",
    "channel": "whatsapp",
    "to": "BUSINESS_PHONE_NUMBER",
    "messages": [{
          "from": PHONE_NUMBER,
          "message_id": "wamid.ID",
          "timestamp": TIMESTAMP,
          "type": "sticker",
          "sticker": {
            "mime_type": "image/webp",
            "sha256": "HASH",
            "id": "ID"
          }
        }]
  }

{
    "project" : "YOUR_PROJECT_NAME",
    "channel": "whatsapp",
    "to": "BUSINESS_PHONE_NUMBER",
    "messages": [{
          "from": PHONE_NUMBER,
          "message_id": "MESSAGE_ID",
          "timestamp": TIMESTAMP,
          "type": "location",
          "location": {
            "latitude": LOCATION_LATITUDE,
            "longitude": LOCATION_LONGITUDE,
            "name": LOCATION_NAME,
            "address": LOCATION_ADDRESS,
         }
        }]
  }

{
    "project" : "YOUR_PROJECT_NAME",
    "channel": "whatsapp",
    "to": "BUSINESS_PHONE_NUMBER",
    "messages": [{
          "from": PHONE_NUMBER,
          "message_id": "MESSAGE_ID",
          "timestamp": TIMESTAMP,
          "type": "button",
          "button": {
            "text": "No",
            "payload": "No-Button-Payload"
          }
        }]
  }

{
    "project" : "YOUR_PROJECT_NAME",
    "channel": "whatsapp",
    "to": "BUSINESS_PHONE_NUMBER",
    "messages": [{
          "from": PHONE_NUMBER,
          "message_id": "MESSAGE_ID",
          "timestamp": TIMESTAMP,
          "type": "interactive",
          "interactive": {
            "list_reply": {
              "id": "list_reply_id",
              "title": "list_reply_title",
              "description": "list_reply_description"
            },
            "type": "list_reply"
          },
        }]
  }

{
    "project" : "YOUR_PROJECT_NAME",
    "channel": "whatsapp",
    "to": "BUSINESS_PHONE_NUMBER",
    "messages": [{
          "from": PHONE_NUMBER,
          "message_id": "MESSAGE_ID",
          "timestamp": TIMESTAMP,
          "type": "interactive",
          "interactive": {
            "button_reply": {
              "id": "unique-button-identifier-here",
              "title": "button-text",
            },
            "type": "button_reply"
          },
        }]
  }

{
    "project" : "YOUR_PROJECT_NAME",
    "channel": "whatsapp",
    "to": "BUSINESS_PHONE_NUMBER",
    "messages": [{
          "from": PHONE_NUMBER,
          "message_id": "MESSAGE_ID",
          "timestamp": TIMESTAMP,
          "type": "contacts",
          "contacts": [{
              "addresses": [{
                  "street": "STREET",
                  "city": "CITY",
                  "state": "STATE",
                  "zip": "ZIP",
                  "country": "COUNTRY",
                  "country_code": "COUNTRY_CODE",
                  "type": "HOME"
                  },
                  {
                  "street": "STREET",
                  "city": "CITY",
                  "state": "STATE",
                  "zip": "ZIP",
                  "country": "COUNTRY",
                  "country_code": "COUNTRY_CODE",
                  "type": "WORK"
                  }],
              "birthday": "YEAR_MONTH_DAY",
              "emails": [{
                  "email": "EMAIL",
                  "type": "WORK"
                  },
                  {
                  "email": "EMAIL",
                  "type": "HOME"
                  }],
              "name": {
                  "formatted_name": "NAME",
                  "first_name": "FIRST_NAME",
                  "last_name": "LAST_NAME",
                  "middle_name": "MIDDLE_NAME",
                  "suffix": "SUFFIX",
                  "prefix": "PREFIX"
              },
              "org": {
                  "company": "COMPANY",
                  "department": "DEPARTMENT",
                  "title": "TITLE"
              },
              "phones": [{
                  "phone": "PHONE_NUMBER",
                  "type": "HOME"
                  },
                  {
                  "phone": "PHONE_NUMBER",
                  "type": "WORK",
                  "wa_id": "PHONE_OR_WA_ID"
                  }],
              "urls": [{
                  "url": "URL",
                  "type": "WORK"
                  },
                  {
                  "url": "URL",
                  "type": "HOME"
                  }]
              }]
         
        }]
  }

{
    "project" : "YOUR_PROJECT_NAME",
    "channel": "whatsapp",
    "phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
    "statuses": [{
          "recipient": "CUSTOMER_PHONE_NUMBER",
          "message_id": "WHATSAPP_MESSAGE_ID",
          "status": "sent",   // sent, delivered, or read
          "type": "status",
          "conversation_id": "CONVERSATION_ID",
          "expiration_timestamp": "CONVERSATION_EXPIRATION_TIMESTAMP",
          "category": "user_initiated" //or business_initiated
          }]
 }



  //Status for Failed  Message

  {
    "project" : "YOUR_PROJECT_NAME",
    "channel": "whatsapp",
    "phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
    "statuses": [{
            "recipient": "CUSTOMER_PHONE_NUMBER",
            "message_id": "WHATSAPP_MESSAGE_ID",
            "status": "failed",
            "type": "status",
            "error": Request for url https://URL.jpg failed with error: 404 (Not Found)"
          }]
  }