> For the complete documentation index, see [llms.txt](https://docs.innopaas.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.innopaas.com/api-reference/api-reference-en/whatsapp-business-api/webhook/inbound-message.md).

# Inbound message

| Field           | Data type | Required | Description                                                                                                                                                                                                                                                                                                                                                                                          |
| --------------- | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id              | String    | Yes      | Message ID                                                                                                                                                                                                                                                                                                                                                                                           |
| accountName     | String    | Yes      | API account name                                                                                                                                                                                                                                                                                                                                                                                     |
| wabaId          | String    | Yes      | Waba Id                                                                                                                                                                                                                                                                                                                                                                                              |
| wamid           | String    | Yes      | Meta WhatsApp message ID                                                                                                                                                                                                                                                                                                                                                                             |
| from            | String    | Yes      | User phone number                                                                                                                                                                                                                                                                                                                                                                                    |
| to              | String    | Yes      | Merchant phone number                                                                                                                                                                                                                                                                                                                                                                                |
| sendTime        | String    | Yes      | Send time, format: 2023-02-22T12:00:00.000Z                                                                                                                                                                                                                                                                                                                                                          |
| customerProfile | JSON      | Yes      | User information                                                                                                                                                                                                                                                                                                                                                                                     |
| type            | String    | Yes      | Message type; text: text message reaction: emoji message image: image message audio: audio message video: video message sticker: sticker message unknown: unknown message location: location message contacts: contact message button: template button reply message interactive: interactive message/interactive button reply message order: order message system: user changed number notification |
| text            | JSON      | No       | Has a value when type=text                                                                                                                                                                                                                                                                                                                                                                           |
| reaction        | JSON      | No       | Has a value when type=reaction                                                                                                                                                                                                                                                                                                                                                                       |
| image           | JSON      | No       | Has a value when type=image                                                                                                                                                                                                                                                                                                                                                                          |
| audio           | JSON      | No       | Has a value when type=audio                                                                                                                                                                                                                                                                                                                                                                          |
| video           | JSON      | No       | Has a value when type=video                                                                                                                                                                                                                                                                                                                                                                          |
| errors          | JSON      | No       | Has a value when type=unknown                                                                                                                                                                                                                                                                                                                                                                        |
| location        | JSON      | No       | Has a value when type=location                                                                                                                                                                                                                                                                                                                                                                       |
| contacts        | JSON      | No       | Has a value when type=contacts                                                                                                                                                                                                                                                                                                                                                                       |
| button          | JSON      | No       | Has a value when type=button                                                                                                                                                                                                                                                                                                                                                                         |
| system          | JSON      | No       | Has a value when type=system                                                                                                                                                                                                                                                                                                                                                                         |
| context         | JSON      | No       | Has a value for context messages when replying to a quoted message                                                                                                                                                                                                                                                                                                                                   |

## **Text message-text: reply example**

| Field     | Data type | Required | Description                   |
| --------- | --------- | -------- | ----------------------------- |
| text.body | String    | Yes      | Indicates the replied content |

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.BgNODYxN...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "text",
        "text": {
            "body": "OK"
        }
    }
}
```

## **Emoji message-reaction: reply example**

| Field              | Data type | Required | Description                                                         |
| ------------------ | --------- | -------- | ------------------------------------------------------------------- |
| reaction.messageId | String    | Yes      | Indicates the wamid of the referenced message (original message ID) |
| reaction.emoji     | String    | Yes      | Indicates the emoji used in the reply                               |
| sendTime           | String    | Yes      | Indicates the time the customer sent the emoji                      |

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.HBgNOD...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "reaction",
        "reaction": {
            "messageId": "wamid.HBgNODY...",
            "emoji": "EMOJI"
        }
    }
}
```

## **Image message-image: reply example**

| Field          | Data type | Required | Description                      |
| -------------- | --------- | -------- | -------------------------------- |
| image.id       | String    | Yes      | Media asset ID                   |
| image.caption  | String    | No       | Media description or title       |
| image.mimeType | String    | No       | Media format type: image/jpeg    |
| image.sha256   | String    | No       | Media asset file hash            |
| image.link     | String    | No       | Download link for the media file |

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.HBgNOD...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "image",
        "image": {
            "id": "975571132156319",
            "caption": "CAPTION",
            "mimeType": "image/jpeg",
            "sha256": "IMAGE_HASH",
            "link": "http://xxxxxxxxxx"
        }
    }
}
```

## **Sticker message-sticker: reply example**

| Field            | Data type | Required | Description                        |
| ---------------- | --------- | -------- | ---------------------------------- |
| sticker.id       | String    | Yes      | Media asset ID                     |
| sticker.mimeType | String    | No       | Sticker format type: image/webp    |
| sticker.sha256   | String    | No       | Sticker asset file hash            |
| sticker.link     | String    | No       | Download link for the sticker file |

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.HBgNOD...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "sticker",
        "sticker": {
            "id": "975571132156319",
            "mimeType": "image/webp",
            "sha256": "HASH",
            "link": "http://xxxxxxxxxx"
        }
    }
}
```

## **Video message-video: reply example**

| Field          | Data type | Required | Description                      |
| -------------- | --------- | -------- | -------------------------------- |
| video.id       | String    | Yes      | Media asset ID                   |
| video.mimeType | String    | No       | Video format type: video/mp4     |
| video.sha256   | String    | No       | Video asset file hash            |
| video.link     | String    | No       | Download link for the video file |

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.HBgNOD...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "video",
        "video": {
            "id": "975571132156319",
            "mimeType": "video/mp4",
            "sha256": "G4fboj5cKcAbCdefzhcAcRdnXJqFJAyTSlNmJANhu4M=",
            "link": "http://xxxxxxxxxx"
        }
    }
}
```

## **Audio message-audio: reply example**

| Field          | Data type | Required | Description                      |
| -------------- | --------- | -------- | -------------------------------- |
| audio.id       | String    | Yes      | Media asset ID                   |
| audio.mimeType | String    | No       | Audio format type: video/mp4     |
| audio.sha256   | String    | No       | Audio asset file hash            |
| audio.link     | String    | No       | Download link for the audio file |

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.HBgNOD...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "audio",
        "audio": {
            "id": "975571132156319",
            "mimeType": "audio/ogg; codecs=opus",
            "sha256": "ffRSAbcDeff3mJ2hBhpzuFY7pYEugTfglD+zx4Qv8X4=",
            "link": "http://xxxxxxxxxx"
        }
    }
}
```

## **Document message-document: reply example**

| Field             | Data type | Required | Description                         |
| ----------------- | --------- | -------- | ----------------------------------- |
| document.id       | String    | Yes      | Media asset ID                      |
| document.mimeType | String    | No       | Document format type: video/mp4     |
| document.sha256   | String    | No       | Document asset file hash            |
| document.link     | String    | No       | Download link for the document file |
| document.caption  | String    | No       | Document description or title       |
| document.filename | String    | No       | Document file name                  |

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.HBgNOD...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "document",
        "document": {
            "id": "975571132156319",
            "caption": "pdf caption",
            "filename": "filename.pdf",
            "mimeType": "application/pdf",
            "sha256": "TJGGMF5tdw3XApVHbABCdeffI7w4OW7GqYEN736PW0s=",
            "link": "http://xxxxxxxxxx"
        }
    }
}
```

## **Location message-location: reply example**

| Field              | Data type | Required | Description                 |
| ------------------ | --------- | -------- | --------------------------- |
| location.latitude  | String    | Yes      | Indicates latitude          |
| location.longitude | String    | Yes      | Indicates longitude         |
| location.name      | String    | Yes      | Indicates the location name |
| location.address   | String    | Yes      | Indicates the address       |

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.HBgNOD...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "location",
        "location": {
            "latitude": 39.90539,
            "longitude": 116.39134,
            "name": "LOCATION_NAME",
            "address": "LOCATION_ADDRESS",
        }
    }
}
```

## **Contact message-contact: reply example**

```json
{
    "body": {
        "accountName": "IW31****5",
        "contacts": [
            {
                "addresses": [
                    {
                        "city": "CONTACT_CITY1",
                        "country": "CONTACT_COUNTRY1",
                        "countryCode": "CONTACT_COUNTRY_CODE1",
                        "state": "CONTACT_STATE1",
                        "street": "CONTACT_STREET1",
                        "type": "HOME or WORK1",
                        "zip": "CONTACT_ZIP1"
                    }
                ],
                "birthday": "CONTACT_BIRTHDAY1",
                "emails": [
                    {
                        "email": "CONTACT_EMAIL1",
                        "type": "WORK or HOME1"
                    }
                ],
                "name": {
                    "firstName": "CONTACT_FIRST_NAME1",
                    "formattedName": "CONTACT_FORMATTED_NAME1",
                    "lastName": "CONTACT_LAST_NAME1",
                    "middleName": "CONTACT_MIDDLE_NAME1",
                    "prefix": "CONTACT_PREFIX1",
                    "suffix": "CONTACT_SUFFIX1"
                },
                "org": {
                    "company": "CONTACT_ORG_COMPANY1",
                    "department": "CONTACT_ORG_DEPARTMENT1",
                    "title": "CONTACT_ORG_TITLE1"
                },
                "phones": [
                    {
                        "phone": "CONTACT_PHONE1",
                        "type": "HOME or WORK>1",
                        "wa_id": "CONTACT_WA_ID1"
                    }
                ],
                "urls": [
                    {
                        "type": "HOME or WORK1",
                        "url": "CONTACT_URL1"
                    }
                ]
            }
        ],
        "customerProfile": {
            "name": "Jack"
        },
        "from": "86183****2197",
        "id": "a1301cb6d0094b2fae36546c22e09044",
        "sendTime": "2024-03-07T10:46:24.000Z",
        "to": "62811****6819",
        "type": "contacts",
        "wabaId": "1**********9",
        "wamid": "wamid.HBgNODYxODM1NTA5MjE5NxUCABIYIDg3RDVFMzQyRjIwQkM5NDQyMDI5OTRERERGNUYx*****=="
    },
    "eventTime": "2024-03-08T09:42:06.363Z",
    "id": "e2bafad5-0aa9-4465-9ed1-c5c01741c5e1",
    "type": "whatsapp_mo_message_received"
}
```

## **Quick reply-button: reply example**

When the customer clicks a quick reply button in the interactive message template, the system will send a response. The following is an example callback format.

| Field        | Data type | Required | Description                                                                                |
| ------------ | --------- | -------- | ------------------------------------------------------------------------------------------ |
| context.from | String    | Yes      | Is the WhatsApp ID that sent the interactive message (phone number without the "+" prefix) |
| context.id   | String    | Yes      | Is the original message ID on the WhatsApp platform.                                       |

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.HBgNOD...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "button",
        "button": {
            "text": "No",
            "payload": "No-Button-Payload"
        },
        "context": {
            "from": "PHONE_NUMBER",
            "id": "wamid.ID"
        }
    }
}
```

## **Unknown message-unknown: reply example**

You may receive callback notifications for unknown messages. For example, a customer may send you an unsupported message, such as a disappearing message (in this case, we will notify the customer that the message type is unsupported).

| Field          | Data type | Required | Description              |
| -------------- | --------- | -------- | ------------------------ |
| errors.code    | String    | Yes      | Indicates the error code |
| errors.details | String    | Yes      | Indicates error details  |
| errors.title   | String    | Yes      | Indicates the error name |

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.HBgNOD...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "unknown",
        "errors": [
            {
                "code": 131051,
                "details": "Message type is not currently supported",
                "title": "Unsupported message type"
            }
        ]
    }
}
```

## **Interactive message-interactive: reply example**

When the user clicks**one item in the list message you sent**you will receive the following webhook notification:

| Field        | Data type | Required | Description                                                                                |
| ------------ | --------- | -------- | ------------------------------------------------------------------------------------------ |
| context.from | String    | Yes      | Is the WhatsApp ID that sent the interactive message (phone number without the "+" prefix) |
| context.id   | String    | Yes      | Is the original message ID on the WhatsApp platform.                                       |

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.HBgNOD...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "interactive",
        "interactive": {
            "listReply": {
                "id": "list_reply_id",
                "title": "list_reply_title",
                "description": "list_reply_description"
            },
            "type": "listReply"
        },
        "context": {
            "from": "PHONE_NUMBER",
            "id": "wamid.ID"
        }
    }
}
```

When the user clicks the**reply button**you will receive the following webhook notification:

```json
{
    "id": "b5e984b3-21b2-42a9-b08b-72e5a4096ac6",
    "type": "whatsapp_mo_message_received",
    "eventTime": "2023-02-22T12:00:00.000Z",
    "body": {
        "id": "63f5d602367ea403f8175a6c",
        "accountName": "IW123456",
        "wabaId": "WHATSAPP_BUSINESS_ACCOUNT_ID",
        "wamid": "wamid.HBgNOD...",
        "from": "PHONE-NUMBER",
        "customerProfile": {
            "name": "Jack"
        },
        "to": "BUSINESS-PHONE-NUMBER",
        "sendTime": "2023-02-22T12:00:00.000Z",
        "type": "interactive",
        "interactive": {
            "buttonReply": {
                "id": "unique-button-identifier-here",
                "title": "button-text"
            },
            "type": "buttonReply"
        },
         "context": {
            "from": "PHONE_NUMBER",
            "id": "wamid.ID"
        }
    }
}
```
