Reference

Daily Connect API

Connect to a voice agent session via Daily for browser-based or test interactions.

Overview

The Daily Connect endpoint creates a real-time voice session for a lead using Daily as the transport layer. This is used for browser-based interactions (via the Web SDK) and playground testing.

Connect to session

POST /connect

Prerequisites

  • The lead must exist and be in BACKLOG status.
  • The lead’s execution_mode must be DAILY or DAILY_TEST.

Request Body

json
{
  "lead_id": "lead_abc123"
}

Response

json
{
  "room_url": "https://breezebuddy.daily.co/room_abc123",
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "session_id": "sess_xyz789",
  "lead_id": "lead_abc123"
}
FieldTypeDescription
room_urlstringDaily room URL to join for the voice session.
tokenstringDaily meeting token — required to authenticate when joining the room.
session_idstringUnique session identifier for tracking.
lead_idstringThe lead associated with this session.

Using the Response

Pass room_url and token to the Daily Web SDK or RTVI client to join the voice session. See the Web SDK Setup guide for details.

Daily events (WebSocket)

During an active Daily session, real-time events are exchanged over a WebSocket connection managed by the Daily transport layer. These events include participant join/leave, audio track state changes, and RTVI application messages.

Event Reference

See RTVI Events for the complete list of events emitted during a Daily session.

Error responses

StatusMeaningCommon Cause
400Bad RequestLead is not in BACKLOG status or execution mode is not DAILY/DAILY_TEST.
404Not FoundLead ID does not exist.
500Server ErrorFailed to create Daily room or generate token.
Was this helpful?