Enneo

Telephony

Complete call and store transcript

POST /telephony/callCompleted

POST /telephony/callCompleted

Called when a call is completed to store the final transcript and call details

Request body

ticketIdintegerbody

Optional ticket id of the enneo call ticket. If provided, the transcript will be attached to the given ticket id

channelIdstringbodyrequired

Unique identifier of a third party system of this call. If a channelId was provided during a previous /agentConnected api call, the transcript will be appended to the corresponding ticket

transcriptobject[]bodyrequired

Complete transcript of the call

durationintegerbody

DEPRECATED: Use totalDurationSeconds instead

totalDurationSecondsintegerbody

Total call duration from start to end in seconds

botDurationSecondsintegerbody

Duration spent with the voice bot (automated conversation) in seconds

queueDurationSecondsintegerbody

Duration spent waiting in queue for an agent in seconds

humanDurationSecondsintegerbody

Duration spent talking with a human agent in seconds

Request Example

{
  "ticketId": 123,
  "channelId": "call_123abc456",
  "transcript": [
    {
      "speaker": "agent",
      "message": "Hello, my name is AI Assistant. How can I help you today?",
      "timestamp": "2024-01-23T14:32:11Z"
    }
  ],
  "duration": 300,
  "totalDurationSeconds": 300,
  "botDurationSeconds": 45,
  "queueDurationSeconds": 30,
  "humanDurationSeconds": 225
}

Responses

200 — Successful operation

Response Example

{
  "success": true
}

400 — Invalid input

404 — Ticket not found

500 — Internal error