Skip to main content

Webhook about Receiving Incoming Messages

Last updated: 15 June 2026

This webhook enables you to receive information about incoming messages from recipients. When a message is received, edna Pulse sends an HTTP POST request to your system's specified URL. This article describes the webhook format and transmitted data.

For example, if a user clicks a button in a WhatsApp message, the webhook may contain the value of the payload parameter — the button code specified when creating the message template.

tip

WhatsApp
Viber
The webhook is available for all channels.

Configuring the URL

To set the URL for the message receipt webhook, send a POST request to the URL https://app.edna.io/api/callback/set .

File IconSetting URLs for Webhooks
tip

Your URL should be genuine and accessible to the public via the internet. Only use the secure HTTPS protocol — the default is TCP port 443. URLs can contain a maximum of 500 characters.

info

If a webhook delivery fails, edna Pulse will attempt to resend it up to three times using a backoff scheme: 4, 128, and 2048 seconds after the previous attempt.

You can also specify the webhook URL in your edna Pulse account: Integration SettingsMain profileWebhook URL for incoming messages.

File IconGeneral Information about edna Pulse API Keys and Webhooks File IconManaging edna Pulse Webhooks

Webhook examples

Received text message

{
"id": 101,
"subject": "test_subject_WA",
"subjectId": 345,
"subscriber": {
"id": 202,
"identifier": "35700000000"
},
"userInfo": {
"userName": "alex",
"firstName": null,
"lastName": null,
"avatarUrl": null
},
"messageContent": {
"type": "TEXT",
"attachment": null,
"location": null,
"caption": null,
"text": "Thank you for your help",
"payload": null,
"story": null,
"items": null
},
"receivedAt": "2022-04-29T15:30:08Z",
"replyOutMessageId": 5043874,
"replyOutMessageExternalRequestId": "2c2dd5f1-5ad8-449d-9c38-b6bdf288f1e5",
"replyInMessageId": null
}

Received text messages with information about the last outgoing message

{
"id": 152,
"subject": "test_subject_WA",
"subjectId": 342,
"subscriber": {
"id": 242,
"identifier": "35700000000"
},
"userInfo": {
"userName": "Alex",
"firstName": null,
"lastName": null,
"avatarUrl": null
},
"messageContent": {
"type": "TEXT",
"attachment": null,
"location": null,
"referral": null,
"caption": null,
"text": "Good afternoon! I am interested in the white mug.",
"payload": null,
"story": null,
"items": null,
"contact": null,
"product": null,
"catalog": null,
"order": null
},
"receivedAt": "2025-12-09T05:00:00Z",
"replyOutMessageId": null,
"replyOutMessageExternalRequestId": null,
"replyInMessageId": null,
"lastMessage": {
"outMessageId": 8542,
"address": "35700000001",
"contentType": "TEXT",
"text": "Hello! We are pleased to offer you our best mugs! Please see the list below.",
"startTime": "2025-12-07T10:12:56Z"
}
}

Received message that is a response to a message with an interactive menu
WhatsApp

{
"id": 102,
"subject": "test_subject_WA",
"subjectId": 345,
"subscriber": {
"id": 202,
"identifier": "35700000000"
},
"userInfo": {
"userName": "alex",
"firstName": null,
"lastName": null,
"avatarUrl": null
},
"messageContent": {
"type": "LIST_PICKER",
"attachment": null,
"location": null,
"caption": null,
"text": null,
"payload": null,
"story": null,
"items": [
{
"identifier": "01",
"title": "item 1",
"subtitle": null
}
]
},
"receivedAt": "2022-04-29T15:27:40Z",
"replyOutMessageId": null,
"replyOutMessageExternalRequestId": null,
"replyInMessageId": 537701
}

Incoming message with the PRODUCT value in the messageContent.type parameter

{
"id": 803101,
"subject": "test_subject_WA",
"subjectId": 47610,
"subscriber": {
"id": 4633047,
"identifier": "3570000000"
},
"userInfo": {
"userName": "John Smith",
"firstName": null,
"lastName": null,
"avatarUrl": null
},
"messageContent": {
"type": "PRODUCT",
"attachment": null,
"location": null,
"caption": null,
"text": "Hello",
"payload": null,
"story": null,
"items": null,
"contact": null,
"product": {
"id": "321",
"catalogId": "123"
},
"catalog": null,
"order": null
},
"receivedAt": "2024-08-05T08: 24: 14Z",
"replyOutMessageId": null,
"replyOutMessageExternalRequestId": null,
"replyInMessageId": null
}

Incoming message with the ORDER value in the messageContent.type parameter

{
"id": 804201,
"subject": "test_subject_WA",
"subjectId": 47610,
"subscriber": {
"id": 4633047,
"identifier": "35700000000"
},
"userInfo": {
"userName": "John Smith",
"firstName": null,
"lastName": null,
"avatarUrl": null
},
"messageContent": {
"type": "ORDER",
"attachment": null,
"location": null,
"caption": null,
"text": null,
"payload": null,
"story": null,
"items": null,
"contact": null,
"product": null,
"catalog": null,
"order": {
"catalogId": "1022121105031922",
"products": [
{
"id": "111222",
"quantity": 2,
"price": 5,
"currency": "EUR"
}
]
}
},
"receivedAt": "2024-08-05T12:44:22Z",
"replyOutMessageId": null,
"replyOutMessageExternalRequestId": null,
"replyInMessageId": null
}

Incoming message with the referral parameter

info

Allows you to get information about where the customer started a conversation in WhatsApp.

{
"id": 115611,
"subject": "test_WA",
"subjectId": 195,
"subscriber": {
"id": 1111111,
"identifier": "35700000000"
},
"userInfo": {
"userName": "Anna",
"firstName": null,
"lastName": null,
"avatarUrl": null
},
"messageContent": {
"type": "TEXT",
"attachment": null,
"location": null,
"referral": {
"body": "This is a great product",
"headline": "Our new product",
"sourceId": "123",
"sourceType": "ad",
"sourceUrl": "https://www.fb.com"
},
"caption": null,
"text": "text for test",
"payload": null,
"story": null,
"items": null,
"contact": null,
"product": null,
"catalog": null,
"order": null
},
"receivedAt": "2024-01-11T11:20:00Z",
"replyOutMessageId": null,
"replyOutMessageExternalRequestId": null,
"replyInMessageId": null
}

Incoming messages with the FLOW value in the messageContent.type parameter

[
{
"id": 101,
"subject": "test_subject_WA",
"subjectId": 50520,
"subscriber": {
"id": 4633047,
"identifier": "35700000000"
},
"userInfo": {
"userName": "John Smith",
"firstName": null,
"lastName": null,
"avatarUrl": null
},
"messageContent": {
"type": "FLOW",
"attachment": null,
"location": null,
"referral": null,
"caption": null,
"text": "{\"flow_token\":\"example\"}",
"payload": null,
"story": null,
"items": null,
"contact": null,
"product": null,
"catalog": null,
"order": null
},
"receivedAt": "2025-03-25T12:12:12Z",
"replyOutMessageId": null,
"replyOutMessageExternalRequestId": null,
"replyInMessageId": null
}
]
[
{
"id": 101,
"subject": "test_subject_WA",
"subjectId": 50520,
"subscriber": {
"id": 4633047,
"identifier": "35700000000"
},
"userInfo": {
"userName": "John Smith",
"firstName": null,
"lastName": null,
"avatarUrl": null
},
"messageContent": {
"type": "FLOW",
"attachment": null,
"location": null,
"referral": null,
"caption": null,
"text": "{\"screen_0_Name_0\":\"Ivan\",\"screen_0_Order_number_1\":\"6\",\"screen_0_Choose_a_topic_2\":\"0_order\",\"flow_token\":\"example\"}",
"payload": null,
"story": null,
"items": null,
"contact": null,
"product": null,
"catalog": null,
"order": null
},
"receivedAt": "2025-03-25T12:12:12Z",
"replyOutMessageId": null,
"replyOutMessageExternalRequestId": null,
"replyInMessageId": null
}
]

Webhook parameters

ParameterData typeDescription
idlongRequest ID.
subjectstringThe name of the channel.
subjectIdlongChannel ID. You can find out through the channel list method.
subscriberobjectInformation about the sender of the message.
subscriber.idlongID.
subscriber.identifierstringPhone number.
userInfoobjectUser information.
userInfo.userNamestringName.
userInfo.firstNamestringLast name.
userInfo.lastNamestringMiddle name.
userInfo.avatarUrlstringAvatar.
messageContentobjectInformation about the message.
messageContent.textstring (optional)

The text of the message. When using WhatsApp Flows, information about Flow will be sent in this parameter.

developers.facebook.com

messageContent.typestring

The type of message. Possible values:

  • TEXT — text message;

  • IMAGE — image;

  • DOCUMENT — the document attached to the message;

  • VIDEO — a message containing a video;

  • AUDIO — a message containing sound;

  • PRODUCT — a message containing the product;

  • ORDER — a message containing the order;

  • LIST_PICKER — WhatsApp interactive menu buttons;

  • FLOW — a message containing WhatsApp Flows.

File IconUsing WhatsApp Flows
textstring

Required if ContentType = TEXT, AUTHENTICATION or FLOW.

  • The text of the message if ContentType = TEXT.

  • The text of the message in which Flow will be embedded if ContentType = FLOW.

  • One-time password if ContentType = AUTHENTICATION.
messageContent.captionstring (optional)Title.
messageContent.payloadstring (optional)The button code. Specified when creating the HSM template.
messageContent.itemsobjectA set of parameters that are returned in a response message from the client when it responds to a message with an interactive menu. If the client's message is ordinary (for example, text) and is not a response to a message with an interactive menu, the parameter is returned as follows: MessageContent.items = null.
messageContent.items.titlestring (required)The name of the element in the original interactive menu.
messageContent.items.subtitlestring (optional)The subtitle of the original interactive menu item.
messageContent.items.identifierinteger (optional)The end-to-end element ID for the entire message will be returned in the user's reply message.
messageContent.locationobject (optional)Location address.
messageContent.attachmentobject (optional)null or document data.
messageContent.attachment.urlstring (optional)The URL of the attached image, document, or video.
messageContent.attachmentnamestring (optional)The name of the attached image, document, or video.
messageContent.attachmentsizestring (optional)Size.
messageContent.contactobject (optional)Contact card consisting of fields: first name, last name, mobile phone.
contact.firstNamestring (optional)The name in the contact card.
contact.lastNamestring (optional)Last name in the contact card.
contact.phoneNumberstring (optional)The mobile phone in the contact card.
receivedAtstringDate and time of receipt.
replyInMessageIdlongThe internal identifier of the user's quoted message. The user quotes his message sent to the company.
replyOutMessageIdlongThe internal identifier of the company's quoted message. The user quotes a message received from the company.
replyOutMessageExternalRequestIdlongThe external identifier of the quoted message of the company, which it specifies when sending an outgoing message via the API. In the event that the user quoted a message received from the company.
messageContent.referralobjectInformation obtained from a link hidden from the user or from an advertisement.
messageContent.referral.bodystringThe ad text associated with the message.
messageContent.referral.headlinestringThe title of the ad associated with the message.
messageContent.referral.sourceIdstringFacebook ad or post ID.
messageContent.referral.sourceTypestringThe type of the ad source.

Possible values:
- ad — ad;
- post — publication.
messageContent.referral.sourceUrlstringThe URL of the ad that the user viewed.
lastMessageobjectAn object containing information about the last outgoing message sent to the recipient in the last 14 days prior to receiving the incoming message.

Features:
- Only for WhatsApp channel;
- Only one last outgoing message sent to the recipient from the edna Pulse personal account or via the edna Pulse API in the last 14 days prior to receiving the incoming message is returned.
- If there is no suitable outgoing message, the lastMessage object is not returned.
- You can enable or disable the return of information about the last outgoing message. The functionality is disabled by default.

To enable the possibility of returning information about the last outgoing message, send a request to the edna support service.
lastMessage.outMessageIdintegerThe internal identifier of the outgoing message.
lastMessage.addressstringRecipient's address is a phone number or other identifier.
lastMessage.contentTypestringThe type of message.
Possible values:
- TEXT — text message.
lastMessage.textstringThe text of the message.
lastMessage.startTimestringThe time of sending the message in the ISO 8601 durations date format.
For example — 2025-07-01T00:00:00Z.
info

You can add to the set of items that are returned as a result of the request. To do this, use the necessary items from the list.