Skip to main content

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

FieldTypeDescription
idstringUnique call ID
startedAtstringCall start date-time in ISO 8601
messagesarrayFull conversation transcript
durationSecondsintegerTotal call duration in seconds
detailsURLstringURL to view call details in dashboard
recordingUrlstringURL to download audio recording
analysis.successEvaluationbooleanWhether success criteria was met
analysis.structuredDataobjectOutput variables and extracted values

Message details

The messages field contains the complete call transcript:

  • role: Participant role (system, agent, user)
  • message: Message content