Skip to main content
Creates a new session for the authenticated workspace, posts the initial user message, and dispatches it to the agent. The response includes a pre-built _links.final_message.href URL — poll it to receive the assistant’s reply.

Request

Body

Exactly one of agent_id, agent_name, or profile must be provided. Sending none returns 400 VALIDATION.
string
required
The first user message in the session.
string
Name of a built-in core agent. One of claude, codex, gemini, opencode, cursor, kimi. Returns 400 VALIDATION if the name is unknown.
string (uuid)
ID of a specific agent in your workspace. Use this to target a custom agent.
object
Reference to a profile or an inline profile to apply to this session.
boolean
default:"false"
When true, the session is hidden from other workspace members.
string[] (uuid[])
Existing artifacts to attach to the initial message.

Response

string (uuid)
Unique identifier for the session.
string
Auto-generated title for the session.
string[]
IDs of pull requests opened by the agent in this session.
string | null
External URL the session was started from, if any (e.g. a Slack message).
boolean
Whether the session has been archived.
boolean
Whether the session is hidden from other workspace members.
string (ISO 8601)
When the session was created.
string (ISO 8601)
When the session was last updated.
string (uuid) | null
The ID of the first thread on the session. Used to build the polling URL for the assistant’s reply.
string
Web URL where the session can be viewed in the Blocks dashboard.
HATEOAS links for the session.

Errors