202 Accepted. The agent continues server-side after the request ends; poll Get Turn until status is terminal.
string
required
Bearer token obtained from Authenticate.
string
required
Published agent UUID. Use the chat’s
agent_id; for a legacy null binding, use your organization’s configured published agent UUID rather than inferring it from display name or is_trellis_default.string
required
Existing member-owned chat UUID. There is no lazy chat creation.
Request body
string
required
Idempotency key, 1–128 characters. Retrying the same semantic payload returns the original turn. Reusing the ID for a different payload returns
409 IDEMPOTENCY_CONFLICT.string
required
Non-empty user message.
string
Database integration for this and later turns. A valid change persists on the chat. A malformed, unknown, or out-of-organization ID returns
400 Integration not found; see the idempotency recovery note below.string
Model override for this turn. Populate choices from List Models.
string[]
Upload IDs from Upload Files.
string
Execute a stored query before agent generation. A database integration must be bound.
object
Saved-query parameters with string values.
string[]
Project scope to persist. Omit the field to retain the stored scope; send
[] to clear it. In request order, the server keeps the first occurrence of each valid, organization-owned, permitted project and persists at most the first two surviving IDs. Duplicate, malformed, unknown, out-of-organization, non-permitted, and additional IDs are silently discarded.string
Legacy shorthand for a one-element
scoped_project_ids. Ignored when the array field is present.Compatibility-only fields
The request model accepts these fields for parity with internal/legacy transports. New external clients should avoid them:Response
string
required
Durable turn UUID.
string
required
Owning chat UUID.
string | null
required
Persisted user-message UUID.
string
required
in_progress for a newly accepted turn. An idempotent replay can return the original turn’s current status: in_progress, completed, failed, or cancelled.string
required
ISO 8601 acceptance timestamp.
Idempotency and concurrency
- Same
client_request_idand same semantic payload: returns the original turn; no second user message is written. - Same ID and different payload:
409withdetail.code: "IDEMPOTENCY_CONFLICT". - Another running turn on the chat:
409withdetail.code: "TURN_ALREADY_RUNNING".
send_message and edit_message: 10 submissions per minute and 3 per 10 seconds combined. A 429 response includes Retry-After; re-authentication does not reset the budget.