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
BACKLOGstatus. - The lead’s
execution_modemust beDAILYorDAILY_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"
}| Field | Type | Description |
|---|---|---|
room_url | string | Daily room URL to join for the voice session. |
token | string | Daily meeting token — required to authenticate when joining the room. |
session_id | string | Unique session identifier for tracking. |
lead_id | string | The 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
| Status | Meaning | Common Cause |
|---|---|---|
400 | Bad Request | Lead is not in BACKLOG status or execution mode is not DAILY/DAILY_TEST. |
404 | Not Found | Lead ID does not exist. |
500 | Server Error | Failed to create Daily room or generate token. |
Was this helpful?