Trillet AI logo

Start Recording

Start recording a call that is in progress.

POSThttps://api.trillet.ai/v2/api/recordings/start-recording

Starts recording a live outbound or web call made by one of your agents.

You usually don't need this endpoint. Calls on a flow with recording turned on are recorded automatically from the start. This endpoint can't record a call whose flow has recording off: it follows the same flow setting.

Headers

x-workspace-idstringrequired

The workspace the call flow and agent belong to.

Request Body

pathwayIdstringrequired

The ID of the call flow the call is running on. It must be in this workspace.

roomNamestringrequired

The room name of the live call (roomName in call history). The room must belong to one of this workspace's agents: outbound rooms start with the agent ID, and web call rooms start with web- followed by the agent ID. Inbound call rooms (starting with call-) can't be recorded through this endpoint.

Response Fields

messagestring

Always "Recording started successfully".

A recording is only made when the call flow has recording turned on and HIPAA mode is off. If recording is off, or HIPAA mode is on, the request still returns 200 with the same message, but nothing is recorded.

Errors

StatusBodyWhen
400{"error": "Invalid workspace ID", "message": "x-workspace-id must be a valid workspace identifier."}The x-workspace-id header is missing or not a valid ID
404{"error": "Call flow not found"}No call flow with pathwayId exists in this workspace
404{"error": "Room not found"}The room doesn't belong to one of this workspace's agents
curl -X POST https://api.trillet.ai/v2/api/recordings/start-recording \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-workspace-id: YOUR_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "pathwayId": "b2b2b2b2b2b2b2b2b2b2b2b2",
    "roomName": "a1a1a1a1a1a1a1a1a1a1a1a1-k3j9x0a1bq"
  }'
{
  "message": "Recording started successfully"
}

Last updated on