Skip to main content
POST
Create a conversation thread with initial turn

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

Combined serializer for creating a thread and immediately creating a turn (answer).

This serializer composes the existing thread and answer serializers to maximize code reuse and maintain consistent validation logic.

Note: The 'stream' parameter is not supported for this endpoint.

name
string

Thread name

Maximum string length: 255
agent_id
integer

ID of the agent to use. If not provided, uses the default agent for the company.

chat_setting_id
integer

DEPRECATED: Use 'agent_id' instead. ID of the chat setting to use. If not provided, uses the default agent for the company.

is_ephemeral
boolean
default:false

Enable ephemeral mode

query
string | null

The user's query

force_tool
string

Name of tool to force use

suggested_query_id
integer

ID of a suggested query

force_mcp_server
string

Name of MCP server to restrict tools to

immediate_final_answer
boolean
default:false

Skip tool calls and return final answer immediately

background
boolean
default:false

Process asynchronously and return immediately

system_prompt_suffix
string

Additional system prompt instructions

Maximum string length: 5000
max_steps
integer
default:8

Maximum reasoning steps

Required range: 1 <= x <= 20
response_format
any

JSON schema specifying response structure

tool_parameters
any

Tool-specific parameters

workspace_ids
integer[]

Workspaces to search for documents

file_ids
integer[]

Specific files to include

tag_ids
integer[]

Specific tags to include

private_scope
boolean

Include user's private workspace

company_scope
boolean

Include company's workspace

Response

Final answer returned synchronously.

id
string
required
thread
string
required
status
enum<string>
required
  • running - running
  • completed - completed
  • failed - failed
  • cancelled - cancelled
  • cancelling - cancelling
Available options:
running,
completed,
failed,
cancelled,
cancelling
messages
object[]
required
created_at
string<date-time>
required
object
string
default:turn
error
object | null
liked
boolean | null