Agent Studio

Calls Endpoints

API endpoints for initiating and monitoring voice calls

Calls Endpoints

Endpoints for initiating voice calls and monitoring their status and transcripts.

Initiate Call

POST /api/v1/calls

Start a new voice call using a workflow.

Request Body:

{
  "workflow_slug": "daily-call",
  "user_id": "user-123",
  "user_data": {
    "name": "John Doe",
    "language": "en"
  },
  "metadata": {
    "session_id": "abc123",
    "source": "mobile-app"
  }
}

Required Fields:

FieldTypeDescription
workflow_slugstringWorkflow to use for this call

Optional Fields:

FieldTypeDescription
user_idstringExternal user identifier
user_dataobjectUser data available as {{user.*}} in templates
metadataobjectAdditional metadata stored with call

Response:

{
  "call_id": "uuid",
  "room_name": "call-uuid",
  "livekit_url": "wss://livekit.example.com",
  "token": "eyJ...",
  "status": "connecting"
}
FieldDescription
call_idUnique call identifier
room_nameLiveKit room name for connection
livekit_urlLiveKit server WebSocket URL
tokenJWT token for LiveKit authentication
statusInitial call status

Get Call

GET /api/v1/calls/{id}

Get call status and details.

Path Parameters:

ParameterTypeDescription
iduuidCall ID

Response:

{
  "id": "uuid",
  "workflow_id": "uuid",
  "workflow_slug": "daily-call",
  "user_id": "user-123",
  "status": "completed",
  "direction": "outbound",
  "duration_seconds": 180,
  "agent_history": ["greeter-agent", "meal-agent", "feedback-agent"],
  "current_agent": null,
  "metrics": {
    "duration_seconds": 180,
    "stt_latency_ms": 120,
    "llm_latency_ms": 280,
    "tts_latency_ms": 85,
    "total_tokens": 1500,
    "agent_handoffs": 2
  },
  "started_at": "2026-01-17T10:30:00Z",
  "ended_at": "2026-01-17T10:33:00Z",
  "created_at": "2026-01-17T10:29:55Z"
}

Get Call Transcript

GET /api/v1/calls/{id}/transcript

Get the full transcript of a call.

Path Parameters:

ParameterTypeDescription
iduuidCall ID

Response:

[
  {
    "role": "system",
    "content": "Call started",
    "timestamp": "2026-01-17T10:30:00Z",
    "agent_name": "greeter-agent"
  },
  {
    "role": "assistant",
    "content": "Hello! How are you today?",
    "timestamp": "2026-01-17T10:30:05Z",
    "agent_name": "greeter-agent"
  },
  {
    "role": "user",
    "content": "I'm doing well, thanks!",
    "timestamp": "2026-01-17T10:30:10Z",
    "agent_name": "greeter-agent"
  },
  {
    "role": "assistant",
    "content": "Great! What did you have for breakfast?",
    "timestamp": "2026-01-17T10:30:15Z",
    "agent_name": "meal-agent",
    "tool_call": {
      "name": "save_meal",
      "arguments": { "meal_type": "breakfast" }
    }
  }
]

Get Call Metrics

GET /api/v1/calls/{id}/metrics

Get performance metrics for a call.

Response:

{
  "duration_seconds": 180,
  "stt_latency_ms": 120,
  "llm_latency_ms": 280,
  "tts_latency_ms": 85,
  "total_tokens": 1500,
  "agent_handoffs": 2
}

List Calls

GET /api/v1/calls

List calls with filtering and pagination.

Query Parameters:

ParameterTypeDescription
pageintegerPage number (default: 1)
page_sizeintegerItems per page (default: 20, max: 100)
statusstringFilter by status
workflow_iduuidFilter by workflow
user_idstringFilter by user
started_afterdatetimeFilter by start time (after)
started_beforedatetimeFilter by start time (before)

Response:

{
  "items": [
    {
      "id": "uuid",
      "workflow_id": "uuid",
      "workflow_slug": "daily-call",
      "user_id": "user-123",
      "status": "completed",
      "duration_seconds": 180,
      "agent_history": ["greeter-agent", "meal-agent"],
      "started_at": "2026-01-17T10:30:00Z",
      "ended_at": "2026-01-17T10:33:00Z"
    }
  ],
  "total": 100,
  "page": 1,
  "page_size": 20,
  "pages": 5
}

List Active Calls

GET /api/v1/calls/active

List currently active calls.

Query Parameters:

ParameterTypeDescription
limitintegerMax results (default: 50, max: 100)

Response:

[
  {
    "id": "uuid",
    "workflow_slug": "daily-call",
    "user_id": "user-456",
    "status": "active",
    "current_agent": "meal-agent",
    "started_at": "2026-01-17T10:35:00Z"
  }
]

Call Status Values

StatusDescription
pendingCall initiated, waiting for connection
connectingEstablishing connection
activeCall in progress
completedCall ended normally
failedCall failed to connect
disconnectedCall dropped unexpectedly
timeoutCall timed out

Call Direction

DirectionDescription
inboundUser initiated the call
outboundSystem initiated the call

Provider Keys Endpoints

List Provider Keys

GET /api/v1/provider-keys

List configured BYOK provider keys (key values are masked).

Response:

{
  "items": [
    {
      "id": "uuid",
      "provider_type": "stt",
      "provider_name": "deepgram",
      "is_default": true,
      "created_at": "2026-01-17T10:30:00Z"
    }
  ]
}

Create Provider Key

POST /api/v1/provider-keys

Add a BYOK provider key.

Request Body:

{
  "provider_type": "stt",
  "provider_name": "deepgram",
  "api_key": "dg_xxxxx",
  "is_default": true
}

Delete Provider Key

DELETE /api/v1/provider-keys/{id}

Delete a provider key. Returns 204 on success.

On this page