Webhook about Receiving Incoming Messages
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
payloadparameter — the button code specified when creating the message template.
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 .
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.
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 → Settings → Main profile → Webhook URL for incoming messages.
General Information about edna Pulse API Keys and Webhooks Managing edna Pulse WebhooksWebhook 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
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
| Parameter | Data type | Description |
|---|---|---|
id | long | Request ID. |
subject | string | The name of the channel. |
subjectId | long | Channel ID. You can find out through the channel list method. |
subscriber | object | Information about the sender of the message. |
subscriber.id | long | ID. |
subscriber.identifier | string | Phone number. |
userInfo | object | User information. |
userInfo.userName | string | Name. |
userInfo.firstName | string | Last name. |
userInfo.lastName | string | Middle name. |
userInfo.avatarUrl | string | Avatar. |
messageContent | object | Information about the message. |
messageContent.text | string (optional) | The text of the message. When using WhatsApp Flows, information about Flow will be sent in this parameter. |
messageContent.type | string | The type of message. Possible values:
|
text | string | Required if
|
messageContent.caption | string (optional) | Title. |
messageContent.payload | string (optional) | The button code. Specified when creating the HSM template. |
messageContent.items | object | A 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.title | string (required) | The name of the element in the original interactive menu. |
messageContent.items.subtitle | string (optional) | The subtitle of the original interactive menu item. |
messageContent.items.identifier | integer (optional) | The end-to-end element ID for the entire message will be returned in the user's reply message. |
messageContent.location | object (optional) | Location address. |
messageContent.attachment | object (optional) | null or document data. |
messageContent.attachment.url | string (optional) | The URL of the attached image, document, or video. |
messageContent.attachmentname | string (optional) | The name of the attached image, document, or video. |
messageContent.attachmentsize | string (optional) | Size. |
messageContent.contact | object (optional) | Contact card consisting of fields: first name, last name, mobile phone. |
contact.firstName | string (optional) | The name in the contact card. |
contact.lastName | string (optional) | Last name in the contact card. |
contact.phoneNumber | string (optional) | The mobile phone in the contact card. |
receivedAt | string | Date and time of receipt. |
replyInMessageId | long | The internal identifier of the user's quoted message. The user quotes his message sent to the company. |
replyOutMessageId | long | The internal identifier of the company's quoted message. The user quotes a message received from the company. |
replyOutMessageExternalRequestId | long | The 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.referral | object | Information obtained from a link hidden from the user or from an advertisement. |
messageContent.referral.body | string | The ad text associated with the message. |
messageContent.referral.headline | string | The title of the ad associated with the message. |
messageContent.referral.sourceId | string | Facebook ad or post ID. |
messageContent.referral.sourceType | string | The type of the ad source.
Possible values:
- ad — ad;
- post — publication. |
messageContent.referral.sourceUrl | string | The URL of the ad that the user viewed. |
lastMessage | object | An 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.outMessageId | integer | The internal identifier of the outgoing message. |
lastMessage.address | string | Recipient's address is a phone number or other identifier. |
lastMessage.contentType | string | The type of message.
Possible values: - TEXT — text message. |
lastMessage.text | string | The text of the message. |
lastMessage.startTime | string | The time of sending the message in the ISO 8601 durations date format. For example — 2025-07-01T00:00:00Z. |
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.