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
if current message is a reply,
reaction or interaction to a previous
message in Whatsapp

parent_ticket_id

ID of parent message's ticket. In cases
if current message is a reply,
reaction or interaction to a previous
message in Whatsapp


OUTBOUND

ParamDescription
message_idMessage ID
ticket_idTicket ID
messageMessage content
user_idUser ID
user_nameUser name
user_emailUser email
contact_idContact ID
contact_nameContact name
contact_emailContact email (if present)
contact_identifierContact phone (if present)
channel_idChannel ID

NOTE

ParamDescription
message_idMessage ID
ticket_idTicket ID
messageMessage content
user_idUser ID
user_nameUser name
user_emailUser email

TICKET_LABEL_ADDED

ParamDescription
ticket_idTicket ID
label_idLabel ID
label_nameLabel name

TICKET_LABEL_DELETED

ParamDescription
ticket_idTicket ID
label_idLabel ID
label_nameLabel name

TICKET_CREATED

ParamDescription
ticket_idTicket ID

TICKET_ASSIGNED

ParamDescription
ticket_idTicket ID
user_idUser ID
user_nameUser name
user_emailUser email
team_idTeam ID
team_nameTeam name
assigned_toTEAM or USER

TICKET_CLOSED

ParamDescription
ticket_idTicket ID

TICKET_MERGED

Param

Description

ticket_id

Ticket ID

merged_and_deleted_ticket_id

Ticket ID that was merged to the ticket_id above
and deleted


TICKET_REOPENED

ParamDescription
ticket_idTicket ID
statusOPEN or ASSIGNED

TICKET_MARKED_AS_SPAM

ParamDescription
ticket_idTicket ID

TICKET_UNMARKED_AS_SPAM

ParamDescription
ticket_idTicket ID

VOICE_CALL_STARTED

ParamDescription
channel_idChannel ID
ticket_idTicket ID
contact_idContact ID
directionINBOUND / OUTBOUND
fromOrigination phone number
toDestination phone number
user_idUser ID
user_nameUser name
user_emailUser email

VOICE_CALL_ENDED

ParamDescription
channel_idChannel ID
ticket_idTicket ID
contact_idContact ID
directionINBOUND / OUTBOUND
fromOrigination phone number
toDestination phone number
user_idUser ID
user_nameUser name
user_emailUser email
durationDuration in seconds

VOICE_CALL_RECORDED

ParamDescription
channel_idChannel ID
ticket_idTicket ID
contact_idContact ID
directionINBOUND / OUTBOUND
fromOrigination phone number
toDestination phone number
user_idUser ID
user_nameUser name
user_emailUser email
durationDuration in seconds
recording_urlRecording URL (when enabled)

VOICE_CALL_MISSED

ParamDescription
channel_idChannel ID
ticket_idTicket ID
contact_idContact ID
fromOrigination phone number
toDestination phone number
durationDuration in seconds
recording_urlRecording URL (when enabled)
failure_reasonList of available reasons: NO_BALANCE, OUTSIDE_BUSINESS_HOURS, FULL_QUEUE, QUEUE_TIME_EXCEEDED, NO_AGENTS_AVAILABLE

VOICE_CALL_ROUTE_NUMBER

ParamDescription
channel_idChannel ID
ticket_idTicket ID
contact_idContact ID
ivr_menu_route_number_idIVR menu route number ID
ivr_menu_idIVR menu ID
actionRoute action
triggerRoute number
team_idRoute to team ID
target_ivr_menu_idRoute to target IVR menu ID
phone_numberRoute to phone number

WHATSAPP_MESSAGE_DELIVERY_FAILED

ParamDescription
typeThe webhook type
message_idTrengo message ID
ticket_idTrengo ticket ID
is_first_messageWhether it is the first message in the ticket
channel_idTrengo channel ID
contact_idTrengo contact ID
contact_phoneContact phone number
whatsapp_message_idWhatsapp message ID
errorsArray of errors, relayed from Whatsapp. Each containing a code and a descriptive title

WHATSAPP_MESSAGE_DELIVERY_FAILED

ParamDescription
typeThe webhook type
message_idTrengo message ID
ticket_idTrengo ticket ID
is_first_messageWhether it is the first message in the ticket
channel_idTrengo channel ID
contact_idTrengo contact ID
contact_phoneContact phone number
whatsapp_message_idWhatsapp message ID
read_atTimestamp when the message was read

FIRST_HUMAN_REPLY_TIME_CALCULATED

ParamDescription
ticket_idTrengo ticket ID
first_human_response_time_with_business_hoursTime until first human agent response with business hours (in seconds)
first_human_response_time_without_business_hoursTime until first human agent response without business hours (in seconds)

CONTACT_CREATED

ParamDescription
contact_idTrengo contact ID
nameContact name
emailContact email
phoneContact phone number (if exists)

CONTACT_UPDATED

ParamDescription
contact_idTrengo contact ID
nameContact name
emailContact email
phoneContact phone number (if exists)

CONTACT_DELETED

ParamDescription
contact_idTrengo contact ID