WayloAIWaylo Docs
APIReferenceSessions

Start a web session

POST
/sessions/web

Creates the session, its LiveKit room and the agent dispatch, and returns what a browser connects with. The participant token is short-lived and reaches one room only.

Access: workspace_member · API key sessions:write

Authorization

api-key
headerAuthorizationBearer <sk_waylo_<lookup><secret><checksum>>

Header Parameters

Authorization*string

Your API key.

Idempotency-Key?string

Retrying with the same key returns the same session and a fresh token.

Request Body

application/json
  1. body
workspaceId*string
Formatuuid
agentId*string
Formatuuid
endUser?
metadata?
useDraft?boolean

Response Body

Created

application/json
  1. response
sessionId*string
Formatuuid
workspaceId*string
Formatuuid
roomName*string
livekitUrl*string

The LiveKit server the browser connects to directly.

participantToken*string

One room, one identity, media grants only.

expiresAt*string
Formatdate-time
turn?
Example Request
curl -X POST 'https://api.poc.app.waylovoice.ai/sessions/web' \  -H 'Authorization: Bearer sk_waylo_...' \  -H 'Content-Type: application/json' \  -d '{  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",  "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2"}'
Example Response
{  "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459",  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",  "roomName": "string",  "livekitUrl": "string",  "participantToken": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "turn": {    "urls": [      "turn:turn.poc.example:3478?transport=udp",      "turn:turn.poc.example:3478?transport=tcp"    ],    "username": "string",    "credential": "string"  }}