Start a conversation with an agent
Starts a voice conversation (modality: voice) or chat (modality: chat) with this Roark-hosted agent and returns its id right away.
channel: web is a conversation in a browser on your site. Call this endpoint from your server, never the browser: it needs your API key. Give the page only web.clientToken; the web SDK spends it to join from one of allowedOrigins before web.clientTokenExpiresAt.
Read it back with GET /v1/conversation/{conversationId} straight away: PENDING until the browser joins, IN_PROGRESS, then ENDED. One nobody joins ends without ever starting and is never billed. Starting a voice conversation needs call:create, a chat chat:create, and the agent a published version that takes that kind.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
voice or chat. The agent must have that modality turned on.
voice, chat, call "voice"
How it is reached. web: in a browser on one of allowedOrigins, joined with the web SDK.
"web"The origins your page may join from, exactly as the browser sends them: https only (http on localhost for development), no paths or wildcards.
1 - 10 elements1 - 255How long the browser has to join, in seconds. Default 120.
30 <= x <= 600120
Response
The conversation, waiting for the browser to join.