Skip to main content

Phone call webhook payload examples

In here you can see what a phone call webhook event has as payload.

The following are the fields that are common for all types of events:

FieldDescription
uuidUUID of the call. Use this value to pull information about the call using 2Chat's API.
account_uuidUUID of your account.
callidID of the call as it comes from the provider.
directionI for inbound, O for outbound.
activetrue when the call is active at the time of the event.
statusPossible values depend on the direction of the call: answered, ringing, failed, missed, completed.
start_timeUTC+0 timestamp of when the call started.
end_timeUTC+0 timestamp of when the call ended.
durationDuration of the call, in seconds.
recording_urlURL of the recording of the call, when available. All call recordings are mp3-encoded.
contactInformation containing the caller in case of inbound calls, or the callee on outbounds calls.
agentInformation containing the 2Chat user who made the outbound call, or answered the call when it's inbound.

Call Status Update

The call.status.update event triggers when a phone call status changes during the call lifecycle, both for inbound and outbound calls.

info

In the example below, we got an incoming call from Juan Perez (+525512345555) who called to virtual number +525512345555 (UUID DID1a42d563-e0a7-4b14-b9e6-ee49e61af123). The call is currently active with the status answered.

{
"uuid": "CDR8612b98c-5e11-4638-8d9d-2f21275256cf",
"account_uuid": "ACC91be87af-5a29-4034-b599-342f2aeb5d52",
"callid": "e73d8d61-2bf0-123f-19aa-9600045bb967",
"direction": "I",
"active": true,
"from": "+525512345555",
"iso_country_code": "MX",
"received_on_number": "+525644448888",
"received_on_number_uuid": "DID1a42d563-e0a7-4b14-b9e6-ee49e61af123",
"is_toll_free": false,
"status": "ANSWERED",
"created_at": "2025-10-25T02:55:28Z",
"updated_at": "2025-10-25T02:55:36Z",
"contact": {
"uuid": "CONe9b31cd3-f11c-44cd-a888-58f4d5e6f4bf",
"first_name": "Juan",
"last_name": "Perez",
"name": "Juan Perez",
"profile_pic_url": null,
"last_updated": "2025-10-07T01:46:27Z"
}
}

Call Incoming Completed

The call.incoming.completed event triggers when an incoming phone call is finalized, whether successfully (answered), or unsuccessfully, as in missed or busy states.

info

In the example below, we got an outbound call made by 2Chat user Juan Perez (+525512345555) who called to virtual number +525512345555 (UUID DID1a42d563-e0a7-4b14-b9e6-ee49e61af123). The call has completed (ended) with a duration of 69 seconds, and was answered by the 2Chat user named Johny Jonessen.

{
"uuid": "CDR3a2764b1-7945-47e6-b948-b33685bf9b40",
"account_uuid": "ACC91be87af-5a29-4034-b599-342f2aeb5d52",
"callid": "040c7556-2c9f-123f-19aa-9600045bb967",
"direction": "I",
"active": false,
"from": "+525512345555",
"iso_country_code": "MX",
"status": "COMPLETED",
"received_on_number": "+525644448888",
"received_on_number_uuid": "DID1a42d563-e0a7-4b14-b9e6-ee49e61af123",
"is_toll_free": false,
"duration": 69,
"recording_url": "https://2chat-user-data-dev.s3.amazonaws.com/ACC91be87af-5a29-4034-b599-342f2aeb5d52/calls/24-24-50A6A21E-68FD603C000B7414-8AC976C0.mp3",
"start_time": "2025-10-25T23:41:55Z",
"end_time": "2025-10-25T23:43:04Z",
"agent_id": "USRe15aebc4-305c-43a3-9a36-1294ac18bbbf",
"contact": {
"uuid": "CONe9b31cd3-f11c-44cd-a888-58f4d5e6f4bf",
"first_name": "Juan",
"last_name": "Perez",
"name": "Juan Perez",
"channel_uuid": null,
"profile_pic_url": null,
"last_updated": "2025-10-07T01:46:27Z"
},
"agent": {
"uuid": "USRe15aebc4-305c-43a3-9a36-1294ac18bbbf",
"first_name": "Johny",
"last_name": "Jonessen",
"full_name": "Johny Jonessen",
"profile_pic_url": "https://s.gravatar.com/avatar/c29c7e82854a215bd539e5ae0c6e1577?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fca.png"
}
}
FieldDescription
fromPhone number of the person who made the call. Check the contact field for more information.
received_on_numberVirtual phone number the call was received on.
received_on_number_uuidThe UUID of the virtual number the call was received on.
is_toll_freetrue when the call is a toll-free call.
call_cost.call_priceWhen present, the call was charged the specified amount.
agent_idUUID of the 2Chat user who answered the call.
contactInformation about the caller, coming from 2Chat's phone directory or a connected integration like HubSpot.
agentInformation containing the 2Chat user who answered the call.

Call Outbound Completed

The call.outbound.completed event triggers when an outbound phone call is finalized, whether successfully (answered), or unsuccessfully with the status set to failed, busy, not-found, etc.

info

In the example below, we got an outbound call made by 2Chat user Johny Jonessen (USRe15aebc4-305c-43a3-9a36-1294ac18bbbf), who called +1234567890 (Juan Perez). The call has completed (ended) with a duration of 7 seconds, and had a cost of USD 0.015.

{
"uuid": "CDRb8d9da57-9244-4628-a813-e427c32e9dae",
"account_uuid": "ACC91be87af-5a29-4034-b599-342f2aeb5d52",
"callid": "56c1dfgnd2k598c5qr2m",
"direction": "O",
"active": false,
"from": "USRe15aebc4-305c-43a3-9a36-1294ac18bbbf",
"iso_country_code": "MX",
"is_toll_free": false,
"duration": 7,
"status": "COMPLETED",
"start_time": "2025-10-25T20:00:37Z",
"end_time": "2025-10-25T20:00:43Z",
"caller_id_uuid": "VCI5873c37a-6584-4a70-86b4-b1993a795164",
"caller_id_used": "+525512345555",
"to_number": "+1234567890",
"recording_url": "https://2chat-user-data.s3.amazonaws.com/ACC91be87af-5a29-4034-b599-342f2aeb5d52/calls/abc....mp3",
"agent_id": "USRe15aebc4-305c-43a3-9a36-1294ac18bbbf",
"created_at": "2025-10-25T20:00:36Z",
"updated_at": "2025-10-25T20:00:45Z",
"contact": {
"uuid": "CONe9b31cd3-f11c-44cd-a888-58f4d5e6f4bf",
"first_name": "Juan",
"last_name": "Perez",
"name": "Juan Perez",
"channel_uuid": null,
"profile_pic_url": null,
"last_updated": "2025-10-07T01:46:27Z"
},
"call_cost": {
"callid": "56c1dfgnd2k598c5qr2m",
"forwarded": false,
"toll_free": false,
"start_dt": "2025-10-25T20:00:37Z",
"end_dt": "2025-10-25T20:00:44Z",
"duration": 7,
"call_price": 0.015
},
"agent": {
"uuid": "USRe15aebc4-305c-43a3-9a36-1294ac18bbbf",
"first_name": "Johny",
"last_name": "Jonessen",
"full_name": "Johny Jonessen",
"profile_pic_url": "https://s.gravatar.com/avatar/c29c7e82854a215bd539e5ae0c6e1577?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fca.png"
}
}
FieldDescription
fromThe UUID of the 2Chat user who made the call. Check the agent field for more information.
caller_id_uuidUUID of the caller-id used to make this call.
caller_id_usedCaller-Id value (phone number) used to make the call.
to_numberPhone number called.
call_cost.call_priceThe cost incurred by this call.
contactInformation about the person being called, which comes from 2Chat's phone directory or a connected integration like HubSpot.
agentInformation containing the 2Chat user who made the call.