End of Call
Triggered when any call ends, regardless of attempt.
Payload
{
"id": "cHYqKdGz25Rq",
"startedAt": "2024-09-24T18:20:22.724Z",
"messages": [{
"role": "system",
"message": "You are a helpful assistant"
}, {
"role": "agent",
"message": "Hello"
}, {
"role": "user",
"message": "Hi"
}],
"durationSeconds": 15,
"detailsURL": "https://fonema.ai/shareable/cHYqKdGz25Rq",
"recordingUrl": "https://fonema.ai/api/v1/storage/calls/cHYqKdGz25Rq.mp3",
"analysis": {
"successEvaluation": true,
"structuredData": {
"myData": "myValueFromCall"
}
}
}
Main fields
| Field | Type | Description |
|---|---|---|
id | string | Unique call ID |
startedAt | string | Call start date-time in ISO 8601 |
messages | array | Full conversation transcript |
durationSeconds | integer | Total call duration in seconds |
detailsURL | string | URL to view call details in dashboard |
recordingUrl | string | URL to download audio recording |
analysis.successEvaluation | boolean | Whether success criteria was met |
analysis.structuredData | object | Output variables and extracted values |
Message details
The messages field contains the complete call transcript:
role: Participant role (system,agent,user)message: Message content