Webhook
message_createdMessage created
Notifies your endpoint whenever a message is created.
Trigger
This webhook is triggered whenever a message gets created, for example when receiving or sending a message from/to a customer.
Payload fields
toRecipient's channel-specific identifier.fromSender's channel-specific identifier.textMessage content.attachmentsArray of message files.statusEither received or sent.channelPlatform identifier (e.g. whatsapp).contactAssociated contact details.createdAtISO 8601 timestamp.metadataCustom message metadata.
Optional fields are included only for specific message types: messageContactCard, messageContext, messageForward, messageInteractiveList, messageLocation and messageReplyButton.
Example payload
json
{
"event": "message_created",
"payload": {
"to": "331122334455",
"from": "335544332211",
"text": "Hello",
"status": "received",
"channel": "whatsapp",
"contact": {
"href": "https://dash.try-eclectic.com/contacts/eb2b914a977e4ab896e7b886698b3eac",
"conversationHref": "https://dash.try-eclectic.com/chat/f3670b13446b412796238b1cd78899f9",
"name": "John Doe",
"tags": ["Lead"],
"uuid": "eb2b914a977e4ab896e7b886698b3eac",
"source": "whatsapp",
"avatarUrl": null,
"createdAt": "2022-10-12T15:57:16Z",
"phoneNumber": "331122334455"
},
"createdAt": "2022-10-18T12:06:29.000+02:00"
}
}