This event is fired whenever a contact sends a message to your channel.
{
"event": "message_received",
"timestamp": "2019-03-27T18:42:48Z",
"data": {
"id": "6456078996108099701",
"channel": {
"id": "6456078759331248741",
"type": "email"
},
"contact": {
"id": "6619975808952586225",
"email": "[email protected]"
},
"content": {
"type": "text",
"payload": "My cat got lost!"
},
"metadata": {
"email": {
"subject": "Urgent 🔥",
"to": [{
"email": "[email protected]",
"name": "Customer Support"
}]
}
}
"nlp": {...}
}
}
Parameter | Type | Description |
---|---|---|
data | object | Object representing message received. It copies the structure of emails sent except for the nlp key which is valid only for received messages. |
data.metadata.email.subject | string | Received email subject. |
data.metadata.email.to | array of email/name pairs | Email addresses with names that were specified by the sender. |
data.nlp | object | See NLP documentation. |