Webhook: Post-Call
After a call has ended, a post-call webhook is sent. The webhook uses Authorization Header and Authorization Token values for authentication to protect your data. Please contact 2X to configure these…
Updated
by NCOL Support
After a call has ended, a post-call webhook is sent. The webhook uses Authorization Header
and Authorization Token
values for authentication to protect your data. Please contact 2X to configure these.
The object sent by the webhook uses the following structure:
{
"id": 123,
"call": {
"end_reason": "transferred",
"telnyx_call_control_id": "v3:1234...",
"answered": true,
"duration": 33,
"call_direction":"outbound"
},
"question_fields":{
"case_number": "8057"
},
"message_left": "N",
"record_phone_number": "+1...",
"record_zip_code": "12345",
"record_first_name": "John",
"record_last_name": "Doe",
"record_timezone": "UTC-5",
"workflow_key": "123ABC",
"workflow_day": 3,
"workflow_call": 1,
"workflow_end": true,
"meta": {
"campaign": "fall2024"
}
"transcript": [
{
"role": "User",
"content": "Hello?"
},
{
"role": "Assistant",
"content": "Hi, is John available?"
},
...
]
}
Field Explanations
id:
Used for reference, please supply to 2X if you have issues.call:
Object containing specific call details.end_reason:
This field specifies the reason the call ended, as identified by both the telecom company and the 2X system. The following reasons can be returned:call_transferred:
call transferred to the provided transfer numberschedule_call_back:
record scheduled a callback and call endednot_interested:
record indicated not interested at this timedo_not_call:
record requested not to be called againwrong_number:
person answering reported a wrong numberend_call:
call was ended by the system and none of the above reasons appliedhung_up:
record hung up or call was disconnectedvoicemail_detected:
telecom reported that voicemail was detectedno_answer:
call rang with no answer or voice mail
failure_reason:
(optional) If the call failed, this field will be added. Possible values are:invalid_number:
Telnyx was unable to dial the number.number_no_service:
After dialing, the system encountered a "this number is not in service" message.unreachable:
The person was unable to be reached.
telnyx_call_control_id:
This field contains the associated call ID from your Telnyx back office. You can use this ID to access additional call details within the Telnyx platform.answered:
Whether the call was answered.duration:
Call duration in seconds.call_direction:
Specifies the call was outbound.
question_fields:
This field contains the answers provided by a person in response to any specific questions asks as part of your company’s provided script.message_left:
This field is set when a voicemail message has been successfully left, distinguishing it from instances where only the presence of a voicemail was detected, and a voicemail may or may not have been left.record_phone_number
,record_zip_code
,record_first_name
,record_last_name
: The record information that was provided by the original API call.record_timezone:
The timezone of the lead as determined by their zip code or area code.workflow_key:
The unique key used to identify the workflow.workflow_day:
The day number of the workflow schedule that the call originated from.workflow_call:
The call number (of the day, eg: Day 3, Call 1) of the workflow schedule that the call originated from.workflow_end:
This field is included when the record has no additional steps defined in the 2X workflow table. It signifies the termination of the current workflow process.meta:
If any meta information was provided in the CRM API request, it will be included here.transcript:
If the call is answered, this field provides the transcript of the conversation. The transcript will be an array of objects, each object containing the role of the speaker and the content of the message.
How did we do?
API: Send Sample Postcall Webhook
Webhook: Inbound Call