Call Ended Event
Resia sends this when a call using a Call Agent that has a call_ended_webhook_url reaches
a terminal status. type is call.ended and call is the same record GET /v1/calls/{call_id}
returns, built when the event is sent. Reply with any 2xx to acknowledge; Resia retries a
failed delivery on a fixed schedule and gives up after the last attempt, repeating the same
call.id each time, so treat a repeated call.id as a duplicate. Each attempt is one row in
GET /v1/request-logs.
Body·
The body Resia POSTs to a Call Agent's call_ended_webhook_url when a call reaches a terminal
status (ENG-3493). The thin WebhookEvent base carries the shared type discriminator; this event
nests the same CallDetail read model that GET /v1/calls/{call_id} returns, so there is one call
shape and not two. The call id and timestamps a customer dedups and orders on live in call.
- Type:callrequiredProperties: 24
Everything in the summary, plus what was said and what was learned.
- typeconst:call.ended
Responses
- application/json
- application/json
{
"type": "call.ended",
"call": {
"call_agent_version_id": "01K1S9V9Q0RS7X4T2N6BJ8ZDE5",
"id": "01K1SA3F7M8QW2V5C9H4YTB0KD",
"call_agent_id": "01K1S7RA9M8QW2V5C9H4YTB0AG",
"call_agent_name": "Front desk",
"direction": "inbound",
"to_phone_number": "+12125550142",
"from_phone_number": "+16465550175",
"status": "queued",
"client_reference": "",
"created_at": "",
"started_at": "",
"ended_at": "",
"duration_ms": 47320,
"duration_secs": 47.32,
"failure": {
"code": "no_answer",
"message": "",
"hangup_cause": "call_rejected",
"sip_hangup_cause": 603
},
"charge_amount_in_cents": 25,
"inputs": {
"additionalProperty": "anything"
},
"analysis": {
"additionalProperty": "anything"
},
"transcript": [
{
"role": "assistant",
"content": "Hi, I'm calling to check whether you have metformin in stock.",
"turn_id": "turn-7",
"timestamp": 1734100000.5,
"started_at": "",
"start_secs": 12.34,
"end_secs": 15.02,
"words": [
{
"word": "metformin",
"start_secs": 12.34,
"end_secs": 12.78
}
],
"interrupted": false,
"spoken_secs": 1.6,
"spoken_text": "",
"capture_method": "exact-pts",
"cut_cause": "barge-in",
"speaker": "patient",
"present": [
"pharmacy"
]
}
],
"stt_stream_started_at": "",
"recording": {
"available": true,
"started_at": "",
"duration_secs": 47.3,
"format": "wav"
},
"primary_participant": "",
"additional_participants": {
"additionalProperty": {
"phone_number": "+16175550188",
"joined_at": "",
"left_at": ""
}
},
"additional_transcripts": {
"additionalProperty": [
{
"role": "assistant",
"content": "Hi, I'm calling to check whether you have metformin in stock.",
"turn_id": "turn-7",
"timestamp": 1734100000.5,
"started_at": "",
"start_secs": 12.34,
"end_secs": 15.02,
"words": [
{
"word": "metformin",
"start_secs": 12.34,
"end_secs": 12.78
}
],
"interrupted": false,
"spoken_secs": 1.6,
"spoken_text": "",
"capture_method": "exact-pts",
"cut_cause": "barge-in",
"speaker": "patient",
"present": [
"pharmacy"
]
}
]
}
}
}
null
