# Received Messages

These are the sample payloads for Inbound Notification you will receive on your webhook&#x20;

{% hint style="info" %}
please refer to this [document ](https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/components#messages-object)as well to see the possible of `received message object`
{% endhint %}

#### Text Message

The following is an example of a text message you received from a customer:

```json
{
    "contacts": [
        {
            "profile": {
                "name": "NAME"
            },
            "wa_id": PHONE_NUMBER
        }
    ],
    "messages": [
        {
            "from": PHONE_NUMBER,
            "id": "wamid.ID",
            "timestamp": TIMESTAMP,
            "text": {
                "body": "MESSAGE_BODY"
            },
            "type": "text"
        }
    ]
}
```

#### Media Message

When media messages are received, the Webhook notification contains information that identifies the media object and enables you to download media. see [Download Media](/whatsapp-api/whatsapp-api/media/download-media.md)

```json
{
    "contacts": [
        {
            "profile": {
                "name": "NAME"
            },
            "wa_id": "WHATSAPP_ID"
        }
    ],
    "messages": [
        {
            "from": PHONE_NUMBER,
            "id": "wamid.ID",
            "timestamp": TIMESTAMP,
            "type": "image",
            "image": {
                "caption": "CAPTION",
                "mime_type": "image/jpeg",
                "sha256": "IMAGE_HASH",
                "id": "ID"
            }
        }
    ]
}
```

#### Reaction Message

The following is an example of a reaction message you received from a customer.

```json
{
    "contacts": [
        {
            "profile": {
                "name": "NAME"
            },
            "wa_id": PHONE_NUMBER
        }
    ],
    "messages": [
        {
            "from": PHONE_NUMBER,
            "id": "wamid.ID",
            "timestamp": TIMESTAMP,
            "reaction": {
                "message_id": "MESSAGE_ID",
                "emoji": "EMOJI"
            },
            "type": "reaction"
        }
    ]
}
```

#### Location Message

The following is an example of a location message you received from a customer.

```json
{
    "contacts": [
        {
            "profile": {
                "name": "NAME"
            },
            "wa_id": "WHATSAPP_ID"
        }
    ],
    "messages": [
        {
            "from": "PHONE_NUMBER",
            "id": "wamid.ID",
            "timestamp": "TIMESTAMP",
            "location": {
                "latitude": LOCATION_LATITUDE,
                "longitude": LOCATION_LONGITUDE,
                "name": LOCATION_NAME,
                "address": LOCATION_ADDRESS,
            }
        }
    ]
}
```

#### Contact Message

The following is an example of a Contact message you received from a customer.

```json
{
    "contacts": [
        {
            "profile": {
                "name": "NAME"
            },
            "wa_id": "WHATSAPP_ID"
        }
    ],
    "messages": [
        {
            "from": "PHONE_NUMBER",
            "id": "wamid.ID",
            "timestamp": "TIMESTAMP",
            "contacts": [
                {
                    "addresses": [
                        {
                            "city": "CONTACT_CITY",
                            "country": "CONTACT_COUNTRY",
                            "country_code": "CONTACT_COUNTRY_CODE",
                            "state": "CONTACT_STATE",
                            "street": "CONTACT_STREET",
                            "type": "HOME or WORK",
                            "zip": "CONTACT_ZIP"
                        }
                    ],
                    "birthday": "CONTACT_BIRTHDAY",
                    "emails": [
                        {
                            "email": "CONTACT_EMAIL",
                            "type": "WORK or HOME"
                        }
                    ],
                    "name": {
                        "formatted_name": "CONTACT_FORMATTED_NAME",
                        "first_name": "CONTACT_FIRST_NAME",
                        "last_name": "CONTACT_LAST_NAME",
                        "middle_name": "CONTACT_MIDDLE_NAME",
                        "suffix": "CONTACT_SUFFIX",
                        "prefix": "CONTACT_PREFIX"
                    },
                    "org": {
                        "company": "CONTACT_ORG_COMPANY",
                        "department": "CONTACT_ORG_DEPARTMENT",
                        "title": "CONTACT_ORG_TITLE"
                    },
                    "phones": [
                        {
                            "phone": "CONTACT_PHONE",
                            "wa_id": "CONTACT_WA_ID",
                            "type": "HOME or WORK>"
                        }
                    ],
                    "urls": [
                        {
                            "url": "CONTACT_URL",
                            "type": "HOME or WORK"
                        }
                    ]
                }
            ]
        }
    ]
}
```

#### Callback Message From Quick Reply Message

When your customer clicks on a quick reply button in an [interactive message template](/whatsapp-api/whatsapp-api/send-messages/template-message.md#interactive-message-templates), a response is sent. Below is an example of the callback format

```json
{
    "contacts": [
        {
            "profile": {
                "name": "NAME"
            },
            "wa_id": "WHATSAPP_ID"
        }
    ],
    "messages": [
        {
            "context": {
                "from": PHONE_NUMBER,
                "id": "wamid.ID"
            },
            "from": "16315551234",
            "id": "wamid.ID",
            "timestamp": TIMESTAMP,
            "type": "button",
            "button": {
                "text": "No",
                "payload": "No-Button-Payload"
            }
        }
    ]
}
```

#### Callback Message From Reply Button

The following webhook notification is received when a user clicks on a reply button you sent. See [interactive message](/whatsapp-api/whatsapp-api/send-messages/interactive-message.md#button-list-payload-sample)

```json
{
    "contacts": [
        {
            "profile": {
                "name": "NAME"
            },
            "wa_id": "PHONE_NUMBER_ID"
        }
    ],
    "messages": [
        {
            "from": PHONE_NUMBER_ID,
            "id": "wamid.ID",
            "timestamp": TIMESTAMP,
            "interactive": {
                "button_reply": {
                    "id": "unique-button-identifier-here",
                    "title": "button-text",
                },
                "type": "button_reply"
            },
            "type": "interactive"
        }
    ]
}
```

#### Callback Message From List Message

The following webhook notification is received when a user clicks on an item from a list message you sent. See [interactive message](/whatsapp-api/whatsapp-api/send-messages/interactive-message.md#interactive-list-payload-sample)

```json
{
    "contacts": [
        {
            "profile": {
                "name": "NAME"
            },
            "wa_id": "PHONE_NUMBER_ID"
        }
    ],
    "messages": [
        {
            "from": PHONE_NUMBER_ID,
            "id": "wamid.ID",
            "timestamp": TIMESTAMP,
            "interactive": {
                "list_reply": {
                    "id": "list_reply_id",
                    "title": "list_reply_title",
                    "description": "list_reply_description"
                },
                "type": "list_reply"
            },
            "type": "interactive"
        }
    ]
}
```

#### Unknown Message

It's possible to receive an unknown message callback notification. For example, a customer could send you a message that's not supported, such as a disappearing message (in which case we'd notify the customer that the message type is not supported).

The following is an example of a message you received from a customer that is not supported.

```json

{
    "contacts": [
        {
            "profile": {
                "name": "NAME"
            },
            "wa_id": "WHATSAPP_ID"
        }
    ],
    "messages": [
        {
            "from": "PHONE_NUMBER",
            "id": "wamid.ID",
            "timestamp": "TIMESTAMP",
            "errors": [
                {
                    "code": 131051,
                    "details": "Message type is not currently supported",
                    "title": "Unsupported message type"
                }
            ],
            "type": "unknown"
        }
    ]
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-wa.neuapix.com/whatsapp-api/whatsapp-api/set-up-webhook/received-messages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
