Skip to main content
POST
Create Conversation (Browser / Chat)

Authorizations

X-API-Key
string
header
required

Your organization's API key (account in the bottom-left of the dashboard → Brosbots API).

Headers

authorization
string | null
X-API-Key
string | null

Path Parameters

agent_id
required

The agent's ID: the public agent_ + 20 characters identifier shown in the dashboard (recommended), or the legacy number. Both address the same agent.

Pattern: ^agent_[A-Za-z0-9]{20}$
Example:

"agent_7fK2mQ9xLp3RtV8wYb1N"

Body

application/json

A conversation record for a browser or chat session. It does not dial anyone.

mode
string
required

Where the conversation will take place. webrtc or smallwebrtc for a voice session in the browser (what the dashboard's test call uses), chat for a text session. Telephony values are accepted for compatibility but only create a record - to place a phone call use POST /agents/{agent_id}/calls.

Example:

"webrtc"

name
string
required

Your label for the conversation.

Example:

"test-1"

initial_context
object | null

Variables the agent can use as {{initial_context.}} in its prompts. Merged over the agent's own default variables.

Example:

Response

Successful Response

id
integer
required
workflow_id
integer
required
name
string
required
mode
string
required
created_at
string<date-time>
required
definition_id
integer
required
initial_context
object | null