Service Agent

Start recording a call

Changed on

Starts recording a call the calling agent owns. The call must be owned by the calling agent, belong to the agent's customer, and be in progress (answered). A call that is still ringing is rejected with 400 and is not answered by this request. If the call is already being recorded, the response is 409. Every field is optional. duration defaults to 7200 seconds (2 hours) and cannot be 0 or more than 7200 on this endpoint. A recording that ends on its own (silence, duration, or end key) clears the call's recording_id. The platform does not announce the recording to the other party. Informing the other party is the organization's responsibility.

post/service_agents/calls/{id}/recording_start

Request

Path parameters

idstring uuid required
Example:550e8400-e29b-41d4-a716-446655440000

The call ID returned from the GET /service_agents/calls response.

Request body

format'wav'

The format of the recording.

end_of_silenceinteger

The duration of silence (in seconds) after which the recording stops. 0 keeps recording regardless of silence.

end_of_keystring

The DTMF key that stops the recording.

durationinteger

The maximum duration of the recording (in seconds). If omitted, 7200 is used.

Example request

{
  "format": "wav",
  "end_of_silence": 10,
  "end_of_key": "#",
  "duration": 3600
}

Response

The call, with the recording_id of the started recording.

idstring uuid

The unique identifier of the call.

customer_idstring uuid

The customer ID that owns this call. Returned from the GET /customers response.

owner_typestring

Type of the resource owner (e.g., agent, queue).

owner_idstring uuid

The unique identifier of the resource owner. Returned from the corresponding owner resource endpoint (e.g., GET /agents, GET /queues).

flow_idstring uuid

The flow ID associated with this call. Returned from the POST /flows or GET /flows response.

activeflow_idstring uuid

The activeflow ID associated with this call. Returned from the POST /activeflows or GET /activeflows response.

type'' | 'flow' | 'conference' | 'sip-service'

Call type

master_call_idstring uuid

The unique identifier of the master call that initiated this call. Returned from the POST /calls or GET /calls response.

chained_call_idsstring[]

Chained call IDs. Each ID is returned from the POST /calls or GET /calls response.

recording_idstring uuid

The current recording ID. Returned from the GET /recordings response.

recording_idsstring[]

Recording IDs associated with this call. Each ID is returned from the GET /recordings response.

groupcall_idstring uuid

Group call ID. Returned from the POST /groupcalls or GET /groupcalls response. Indicates this call is part of a group call.

status'dialing' | 'ringing' | 'progressing' | 'terminating' | 'canceling' | 'hangup'

Call status

direction'incoming' | 'outgoing'

Call direction

mute_direction'' | 'both' | 'out' | 'in'

Possible mute directions for the call

hangup_by'' | 'remote' | 'local'

Indicates who hung up the call

hangup_reason'' | 'normal' | 'failed' | 'busy' | 'cancel' | 'timeout' | 'noanswer' | 'dialout' | 'amd'

Reason for call hangup

metadataobject nullable

Internal metadata for the call. Contains key-value pairs set by the system. Currently supported keys:

  • rtp_debug (boolean): When true, RTPEngine is capturing RTP traffic for this call.
tm_progressingstring date-time

Timestamp for call progressing.

tm_ringingstring date-time

Timestamp for call ringing.

tm_hangupstring date-time

Timestamp for call hangup.

tm_createstring date-time

The creation timestamp.

tm_updatestring date-time

The last update timestamp.

tm_deletestring date-time

The deletion timestamp, if applicable.

Example response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "customer_id": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d",
  "owner_type": "agent",
  "owner_id": "c2d3e4f5-a6b7-8901-2cde-f01234567890",
  "flow_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
  "activeflow_id": "d4e5f6a7-b8c9-0123-4567-890abcdef012",
  "type": "flow",
  "master_call_id": "4d5e6f7a-8b9c-0123-def0-123456789012",
  "chained_call_ids": [
    "550e8400-e29b-41d4-a716-446655440000"
  ],
  "recording_id": "e5f6a7b8-c9d0-1234-5678-90abcdef0123",
  "recording_ids": [
    "e5f6a7b8-c9d0-1234-5678-90abcdef0123"
  ],
  "groupcall_id": "5e6f7a8b-9c0d-1234-ef01-234567890123",
  "source": {
    "type": "tel",
    "target": "+14155551234",
    "target_name": "John Smith",
    "name": "Main Office",
    "detail": "Primary contact number"
  },
  "destination": {
    "type": "tel",
    "target": "+14155551234",
    "target_name": "John Smith",
    "name": "Main Office",
    "detail": "Primary contact number"
  },
  "status": "progressing",
  "action": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "next_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "talk",
    "tm_execute": "2026-01-15T09:30:00.000000Z"
  },
  "direction": "outgoing",
  "mute_direction": "both",
  "hangup_by": "remote",
  "hangup_reason": "normal",
  "metadata": {
    "rtp_debug": true
  },
  "tm_progressing": "2026-01-15T09:30:00.000000Z",
  "tm_ringing": "2026-01-15T09:30:00.000000Z",
  "tm_hangup": "2026-01-15T09:30:00.000000Z",
  "tm_create": "2026-01-15T09:30:00.000000Z",
  "tm_update": "2026-01-15T09:30:00.000000Z",
  "tm_delete": "2026-01-15T09:30:00.000000Z"
}

Changes