curl --request POST \
--url https://api.iwy.ai/v1/start-agent-session \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "550e8400-e29b-41d4-a716-446655440000"
}
'{
"roomUrl": "https://iwy.daily.co/abc123xyz",
"dailyToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"webLink": "https://meet.iwy.ai/550e8400-e29b-41d4-a716-446655440000"
}{
"error": "agentId is required"
}{
"error": "Authentication failed with the session service."
}{
"error": "Access denied by the session service."
}{
"success": false,
"error": "Internal server error",
"details": "An unexpected error occurred"
}Sessions
Start agent session
Starts a video call session with an agent. This endpoint creates a Daily.co room and returns the connection details needed to join the call.
How it works
- Call this endpoint with an agent ID
- Receive a
roomUrl,dailyToken, andwebLink - Use
roomUrlanddailyTokenwith the Daily.co SDK to join programmatically, or share thewebLinkfor browser-based access.
POST
/
start-agent-session
curl --request POST \
--url https://api.iwy.ai/v1/start-agent-session \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "550e8400-e29b-41d4-a716-446655440000"
}
'{
"roomUrl": "https://iwy.daily.co/abc123xyz",
"dailyToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"webLink": "https://meet.iwy.ai/550e8400-e29b-41d4-a716-446655440000"
}{
"error": "agentId is required"
}{
"error": "Authentication failed with the session service."
}{
"error": "Access denied by the session service."
}{
"success": false,
"error": "Internal server error",
"details": "An unexpected error occurred"
}Body
application/json
Request to start a video call session with an agent
The agent ID (UUID) to start a session with, or 'demo' for a demo session
Example:
"550e8400-e29b-41d4-a716-446655440000"
Response
Session started successfully
Response containing Daily.co room connection details and a web link for browser-based access
The Daily.co room URL to join
Example:
"https://iwy.daily.co/abc123xyz"
Authentication token for joining the Daily.co room
Example:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
A shareable web link for joining the agent session in a browser
Example:
"https://meet.iwy.ai/550e8400-e29b-41d4-a716-446655440000"