Create a conversation
Creates a conversation. What happens — and what comes back — depends on the channel:
| Channel | Behavior | Success status |
|---|---|---|
telephone | Queues an outbound call; the dialer places it shortly after. | 202 |
text | Creates the session and returns the agent’s greeting immediately. | 200 |
email | Creates the session; the greeting is sent asynchronously. | 200 |
webrtc | Creates the session and returns a join token for the browser/SDK. | 200 |
Choosing the agent. Identify the agent in exactly one way: agent_id, agent_version_id, or agent_config. Providing more than one returns 422. The referenced version must be published.
Per-channel requirements:
telephone—user_idmust be a valid+E.164number; provideagent_number,agent_id, oragent_version_id.text/webrtc— provideagent_id,agent_version_id, oragent_config.email—to_addressis required, plus one agent reference.
Requires a token with write access.
Authorizations
Personal access token. See Authentication.
Body
The conversation channel.
telephone, webrtc, email, text Your identifier for the end user. For telephone, must be a +E.164 phone number (e.g. +14155551234). For email, the recipient is set via to_address.
The agent to use. Its latest published version is selected unless version is given.
A specific published agent version to use.
An inline agent configuration, instead of referencing a stored agent.
Used together with agent_id: a version number, or "latest" (the default). The version must be published.
The agent's phone number, for telephone conversations.
Recipient email address. Required for email.
Sender email address, for email conversations.
Subject line for an outbound-initiated email. If omitted, the agent's configured email default_subject is used.
Text injected into the agent's prompt at the start of the conversation.
Arbitrary JSON attached to the conversation; returned later and usable as a list filter.
Optional client-supplied UUID for idempotent creation. If a conversation with this ID already exists, it is returned unchanged.
Response
Conversation created (text, email, or webrtc). The body shape depends on the channel.
- Option 1
- Option 2
Returned for text and email conversations.

