Event payload
The payload of each webhook depends on the type of the event. Use this list to see what payload we will POST to your URL
INBOUND
Param | Description |
|---|---|
message_id | Message ID |
ticket_id | Ticket ID |
contact_id | Contact ID |
message | Message content |
contact_name | Contact name |
contact_email | Contact email (if present) |
contact_identifier | Contact phone (if present) |
channel_id | Channel ID |
parent_message_id | ID of parent message. In cases |
parent_ticket_id | ID of parent message's ticket. In cases |
OUTBOUND
| Param | Description |
|---|---|
| message_id | Message ID |
| ticket_id | Ticket ID |
| message | Message content |
| user_id | User ID |
| user_name | User name |
| user_email | User email |
| contact_id | Contact ID |
| contact_name | Contact name |
| contact_email | Contact email (if present) |
| contact_identifier | Contact phone (if present) |
| channel_id | Channel ID |
NOTE
| Param | Description |
|---|---|
| message_id | Message ID |
| ticket_id | Ticket ID |
| message | Message content |
| user_id | User ID |
| user_name | User name |
| user_email | User email |
TICKET_LABEL_ADDED
| Param | Description |
|---|---|
| ticket_id | Ticket ID |
| label_id | Label ID |
| label_name | Label name |
TICKET_LABEL_DELETED
| Param | Description |
|---|---|
| ticket_id | Ticket ID |
| label_id | Label ID |
| label_name | Label name |
TICKET_CREATED
| Param | Description |
|---|---|
| ticket_id | Ticket ID |
TICKET_ASSIGNED
| Param | Description |
|---|---|
| ticket_id | Ticket ID |
| user_id | User ID |
| user_name | User name |
| user_email | User email |
| team_id | Team ID |
| team_name | Team name |
| assigned_to | TEAM or USER |
TICKET_CLOSED
| Param | Description |
|---|---|
| ticket_id | Ticket ID |
TICKET_MERGED
Param | Description |
|---|---|
ticket_id | Ticket ID |
merged_and_deleted_ticket_id | Ticket ID that was merged to the ticket_id above |
TICKET_REOPENED
| Param | Description |
|---|---|
| ticket_id | Ticket ID |
| status | OPEN or ASSIGNED |
TICKET_MARKED_AS_SPAM
| Param | Description |
|---|---|
| ticket_id | Ticket ID |
TICKET_UNMARKED_AS_SPAM
| Param | Description |
|---|---|
| ticket_id | Ticket ID |
VOICE_CALL_STARTED
| Param | Description |
|---|---|
| channel_id | Channel ID |
| ticket_id | Ticket ID |
| contact_id | Contact ID |
| direction | INBOUND / OUTBOUND |
| from | Origination phone number |
| to | Destination phone number |
| user_id | User ID |
| user_name | User name |
| user_email | User email |
VOICE_CALL_ENDED
| Param | Description |
|---|---|
| channel_id | Channel ID |
| ticket_id | Ticket ID |
| contact_id | Contact ID |
| direction | INBOUND / OUTBOUND |
| from | Origination phone number |
| to | Destination phone number |
| user_id | User ID |
| user_name | User name |
| user_email | User email |
| duration | Duration in seconds |
VOICE_CALL_RECORDED
| Param | Description |
|---|---|
| channel_id | Channel ID |
| ticket_id | Ticket ID |
| contact_id | Contact ID |
| direction | INBOUND / OUTBOUND |
| from | Origination phone number |
| to | Destination phone number |
| user_id | User ID |
| user_name | User name |
| user_email | User email |
| duration | Duration in seconds |
| recording_url | Recording URL (when enabled) |
VOICE_CALL_MISSED
| Param | Description |
|---|---|
| channel_id | Channel ID |
| ticket_id | Ticket ID |
| contact_id | Contact ID |
| from | Origination phone number |
| to | Destination phone number |
| duration | Duration in seconds |
| recording_url | Recording URL (when enabled) |
| failure_reason | List of available reasons: NO_BALANCE, OUTSIDE_BUSINESS_HOURS, FULL_QUEUE, QUEUE_TIME_EXCEEDED, NO_AGENTS_AVAILABLE |
VOICE_CALL_ROUTE_NUMBER
| Param | Description |
|---|---|
| channel_id | Channel ID |
| ticket_id | Ticket ID |
| contact_id | Contact ID |
| ivr_menu_route_number_id | IVR menu route number ID |
| ivr_menu_id | IVR menu ID |
| action | Route action |
| trigger | Route number |
| team_id | Route to team ID |
| target_ivr_menu_id | Route to target IVR menu ID |
| phone_number | Route to phone number |
WHATSAPP_MESSAGE_DELIVERY_FAILED
| Param | Description |
|---|---|
| type | The webhook type |
| message_id | Trengo message ID |
| ticket_id | Trengo ticket ID |
| is_first_message | Whether it is the first message in the ticket |
| channel_id | Trengo channel ID |
| contact_id | Trengo contact ID |
| contact_phone | Contact phone number |
| whatsapp_message_id | Whatsapp message ID |
| errors | Array of errors, relayed from Whatsapp. Each containing a code and a descriptive title |
WHATSAPP_MESSAGE_DELIVERY_FAILED
| Param | Description |
|---|---|
| type | The webhook type |
| message_id | Trengo message ID |
| ticket_id | Trengo ticket ID |
| is_first_message | Whether it is the first message in the ticket |
| channel_id | Trengo channel ID |
| contact_id | Trengo contact ID |
| contact_phone | Contact phone number |
| whatsapp_message_id | Whatsapp message ID |
| read_at | Timestamp when the message was read |
FIRST_HUMAN_REPLY_TIME_CALCULATED
| Param | Description |
|---|---|
| ticket_id | Trengo ticket ID |
| first_human_response_time_with_business_hours | Time until first human agent response with business hours (in seconds) |
| first_human_response_time_without_business_hours | Time until first human agent response without business hours (in seconds) |
CONTACT_CREATED
| Param | Description |
|---|---|
| contact_id | Trengo contact ID |
| name | Contact name |
| Contact email | |
| phone | Contact phone number (if exists) |
CONTACT_UPDATED
| Param | Description |
|---|---|
| contact_id | Trengo contact ID |
| name | Contact name |
| Contact email | |
| phone | Contact phone number (if exists) |
CONTACT_DELETED
| Param | Description |
|---|---|
| contact_id | Trengo contact ID |
Updated 7 days ago
