User shares location

{   
  "app": "DemoApp", 
  "timestamp": 1580228767338,   
  "version": 2, 
  "type": "message",    
  "payload": {  
    "id": "ABEGkYaYVSEEAhCIxTq7KXQIqby1Uo-IO7_E",   
    "source": "918x98xx21x4",   
    "type": "location", 
    "payload": {    
      "longitude": "72.8552172",    
      "latitude": "19.1453658"  
    },  
    "sender": { 
      "phone": "918x98xx21x4",  
      "name": "Smit",   
      "country_code": "91", 
      "dial_code": "8x98xx21x4" 
    }   
  } 
}

Payload object description

KeyDescriptionExample
longitudeThe longitude of the location72.8552172
latitudeThe latitude of the location19.1453658

The user shares a contact card

{
  "app": "DemoApp",
  "timestamp": 1584898884710,
  "version": 2,
  "type": "message",
  "payload": {
    "id": "ABEGkYaYVSEEAhD9cTZVyPlOGYZJOnviI7OJ",
    "source": "918x98xx21x4",
    "type": "contact",
    "payload": {
      "contacts": [
        {
          "addresses": [
            {
              "city": "Menlo Park",
              "country": "United States",
              "countryCode": "us",
              "state": "CA",
              "street": "1 Hacker Way",
              "type": "HOME",
              "zip": "94025"
            },
            {
              "city": "Menlo Park",
              "country": "United States",
              "countryCode": "us",
              "state": "CA",
              "street": "200 Jefferson Dr",
              "type": "WORK",
              "zip": "94025"
            }
          ],
          "emails": [
            {
              "email": "[email protected]",
              "type": "WORK"
            },
            {
              "email": "[email protected]",
              "type": "WORK"
            }
          ],
          "ims": [

          ],
          "name": {
            "first_name": "Dev",
            "formatted_name": "Dev Support",
            "last_name": "Support"
          },
          "org": {
            "company": "Dev Support"
          },
          "phones": [
            {
              "phone": "+91 77383 05433",
              "type": "Mobile"
            }
          ],
          "urls": [
            {
              "url": "https://www.facebook.com",
              "type": "WORK"
            }
          ]
        }
      ]
    },
    "sender": {
      "phone": "918x98xx21x4",
      "name": "Smit",
      "country_code": "91",
      "dial_code": "8x98xx21x4"
    }
  }
}

Payload object description

KeyTypeDescriptionExample
addressesarrayFull contact address(es). This field can contain street, city, state, zip, country, country_code, and type fields.{ "city": "Menlo Park", "country": "United States", "countryCode": "us", "state": "CA", "street": "1 Hacker Way", "type": "HOME", "zip": "94025" }
emailarrayContact email address(es). This field can contain the email and type fields.{ "email": "[email protected]", "type": "WORK" }
birthdayYYYY-MM-DD formatted stringContacts birthday1995-10-06
imsarrayMessaging contact information. This field contains the service and user_id fields.
namearrayFull contact name. This field can contain the first_name, middle_name, last_name, formatted_name, name-prefix, and name_suffix fields.{"first_name":"Dev","formatte name": "Dev Support","last_name": "Support"}
orgarrayContact organization information. This field can contain the company, department, and title fields.{"company":"Dev Support"}
phonesarrayContact phone number(s). This field can contain the phone, wa_id, and type fields.[{"phone":"+917738305433","type":"Mobile"}]
urlsarrayContact URL(s). This field can contain the url and type fields.[{"url":"https://www.facebook.com", "type": "WORK" }]

Referral

This event occurs when a user clicks on an Ad that takes them to the WhatsApp application to send a message to your business. The inbound event includes the ad's information.

{
    "app": "DemoApp",
    "timestamp": 1624350395531,
    "version": 2,
    "type": "message",
    "payload": {
        "id": "ABEGkZlpNARoAgo6v1b-zBR7EnX3",
        "source": "918x98xx21x4",
        "type": "text",
        "payload": {
            "text": "I saw this on Facebook..."
        },
        "sender": {
            "phone": "918x98xx21x4",
            "name": "Smit",
            "country_code": "91",
            "dial_code": "8x98xx21x4"
        },
        "referral": {
                "body": "Test post payload",
                "headline": "Demo Gupshup ad",
                "image": {
                    "id": "6a35b528-429d-4fe3-953d-536ef0397ece"
                },
                "source_id": "951242428775548",
                "source_type": "post",
                "source_url": "https://fb.me/2oNXGTsjn"
        }
    }
}

Payload object description

KeyDescriptionExample
headlineThe headline of the AdDemo Gupshup Ad
bodyThe body of the AdTest post payload
source_typeThe Ad's source type.
Supported values are ad and post.
post
source_idIt is the Facebook ID for an Ad or a post951242428775548
source_urlThe URL of the Adhttps://fb.me/2oNXGTsjn
image or videoOptional

The Ad's image or video ID.
{ "id": "6a35b528-429d-4fe3-953d-536ef0397ece" }

Inbound Reactions

End-users on WhatsApp can react to the business's message with an emoji. The payload is sent to the business as an inbound message. This feature is currently available only for CAPI users i.e. users who have WhatsApp docker hosted in Meta Cloud

"body": {
    "app": "sumitqacloudapp",
    "timestamp": 1693819859221,
    "version": 2,
    "type": "message",
    "payload": {
      "id": "wamid.HBgMOTE4MzI5NzUwODAwFQIAEhggMkI4QkY5QjIyOEE4RTE3NDc4M0FBRkIxREY5NTY5N0UA",
      "source": "918329750800",
      "type": "reaction",
      "payload": {
        "id": "9340ac2e-efe7-4836-b379-65a92b281375",
        "gsId": "d8b6b10a-f61e-4ff5-910a-a1ac34b439ef",
        "emoji": "❤️"
      },
      "sender": {
        "phone": "918329750800",
        "name": "~me",
        "country_code": "91",
        "dial_code": "8329750800"
      }
    }
  }

Payload description

KeyDescription
idWhatsApp msg ID
emojiEmoji user reacted with
gsIDGupshup message ID

What’s Next

In the next chapter of this guide, you'll learn about inbound events and their types.