Webhook Reference
A standard webhook sent by OmniChat has the following format:
| Field | Type | Description |
|---|---|---|
| objectId | string | Informs the id of the object |
| resource | string | Informs the type of object that was sent, can it be: Message |
| event | string (enum) | Event type on the object: CREATE |
| timestamp | timestamp | Event date/time. |
| payload | json | Object containing resource data. Only Message resource has this field set. |
Message payload format:
| Field | Type | Description |
|---|---|---|
| chat | json | Tells which conversation the message belongs to. It's a json containing the fields:
It is possible to know the Chat data through the endpoint: |
| platform | string | Informs the platform of the conversation: WAB-OMNICHAT |
| status | string | Informs the status of the message: INCOMING_RECEIVED (received and unread) |
| system | boolean | Informs if it is a systemic message. |
| type | string | Informs the type of message content: IMAGE |
| text | string | The text of the message |
| createdAt | ISO string | Tells you when the message was created |
| updatedAt | ISO string | Tells you when the message was updated |
| objectId | string | Payload object id (it's the same as the main object) |
| routeToUser | json | When the message type is routing and the routing is for the user, this field will be filled in with the information of the user who received the routing.
|
| routeToTeam | json | When the message type is routing and the routing is for a team, this field will be filled in with the information of the team that received the routing.
|
| user | json | Omnichat user that sent this message, this field will be filled in with the information of the user who received the routing.
|
Updated 10 months ago