Conversations
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
DELETE | |
POST | |
PATCH | |
POST | |
GET | |
POST | |
PATCH | |
DELETE | |
POST | |
GET | |
POST | |
GET | |
DELETE | |
GET | |
POST | |
GET | |
DELETE |
List all environments conversations
Required API key scopes
conversation:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /environments /:environment_id /conversationsExample response
Status 200
Create environments conversations
Unified endpoint that handles both conversation creation and streaming.
- If message is provided: Start new conversation processing
- If no message: Stream from existing conversation
Required API key scopes
conversation:writeRequest parameters
- contentstringnull
- conversationstring
- contextual_toolsobject
- ui_context
- billing_context
- trace_idstring
- session_idstring
- agent_mode
- is_sandboxbooleanDefault:
false - resume_payload
Response
Example request
POST /api /environments /:environment_id /conversationsExample response
Status 201
Retrieve environments conversations
Required API key scopes
conversation:readPath parameters
- conversationstring
Response
Example request
GET /api /environments /:environment_id /conversations /:conversationExample response
Status 200
Delete environments conversations
Delete a conversation.
Required API key scopes
conversation:writePath parameters
- conversationstring
Example request
DELETE /api /environments /:environment_id /conversations /:conversationExample response
Status 204 No response body
Create environments conversations append message
Appends a message to an existing conversation without triggering AI processing. This is used for client-side generated messages that need to be persisted (e.g., support ticket confirmation messages).
Path parameters
- conversationstring
Request parameters
- contentstring
Response
Example request
POST /api /environments /:environment_id /conversations /:conversation /append_messageExample response
Status 200
Update environments conversations cancel
Cancel the conversation's in-progress LangGraph run.
Path parameters
- conversationstring
Request parameters
Example request
PATCH /api /environments /:environment_id /conversations /:conversation /cancelExample response
Status 204 Cancellation accepted, or already cancelling.
Status 422 Failed to cancel the conversation.
Create environments conversations open
Create-or-resume a sandbox conversation — the single sandbox session opener. With content, processes the turn (first message, in-progress follow-up, or terminal resume); without content, warms a sandbox that idles awaiting the first message. Returns the (task, run) handle the frontend opens SSE against. The conversation row is created on first use from the URL id.
Path parameters
- conversationstring
Request parameters
- contentstringnull
- trace_idstring
- attached_contextarray
- initial_permission_mode
- task_idstring
Response
Example request
POST /api /environments /:environment_id /conversations /:conversation /openExample response
Status 200
Status 204 Warm request that provisioned nothing (pool full / released).
Status 400 Conversation is not on the sandbox runtime.
Retrieve environments conversations queue
Path parameters
- conversationstring
Response
Example request
GET /api /environments /:environment_id /conversations /:conversation /queueExample response
Status 200
Create environments conversations queue
Path parameters
- conversationstring
Request parameters
Response
Example request
POST /api /environments /:environment_id /conversations /:conversation /queueExample response
Status 200
Update environments conversations queue
Path parameters
- conversationstring
- queue_idstring
Request parameters
Response
Example request
PATCH /api /environments /:environment_id /conversations /:conversation /queue /:queue_idExample response
Status 200
Delete environments conversations queue
Path parameters
- conversationstring
- queue_idstring
Example request
DELETE /api /environments /:environment_id /conversations /:conversation /queue /:queue_idExample response
Status 204 No response body
Create environments conversations queue clear
Path parameters
- conversationstring
Request parameters
Response
Example request
POST /api /environments /:environment_id /conversations /:conversation /queue /clearExample response
Status 200
List all environments conversations views
Required API key scopes
conversation:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /environments /:environment_id /conversations /viewsExample response
Status 200
Create environments conversations views
Required API key scopes
conversation:writeRequest parameters
- namestring
- filtersobject
Response
Example request
POST /api /environments /:environment_id /conversations /viewsExample response
Status 201
Retrieve environments conversations views
Required API key scopes
conversation:readPath parameters
- short_idstring
Response
Example request
GET /api /environments /:environment_id /conversations /views /:short_idExample response
Status 200
Delete environments conversations views
Required API key scopes
conversation:writePath parameters
- short_idstring
Example request
DELETE /api /environments /:environment_id /conversations /views /:short_idExample response
Status 204 No response body
List all conversations
Required API key scopes
conversation:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /conversationsExample response
Status 200
Create conversations
Unified endpoint that handles both conversation creation and streaming.
- If message is provided: Start new conversation processing
- If no message: Stream from existing conversation
Required API key scopes
conversation:writeRequest parameters
- contentstringnull
- conversationstring
- contextual_toolsobject
- ui_context
- billing_context
- trace_idstring
- session_idstring
- agent_mode
- is_sandboxbooleanDefault:
false - resume_payload
Response
Example request
POST /api /projects /:project_id /conversationsExample response
Status 201
Retrieve conversations
Required API key scopes
conversation:readPath parameters
- conversationstring
Response
Example request
GET /api /projects /:project_id /conversations /:conversationExample response
Status 200
Delete conversations
Delete a conversation.
Required API key scopes
conversation:writePath parameters
- conversationstring
Example request
DELETE /api /projects /:project_id /conversations /:conversation