Skip to main content
POST
Create a thread

Authorizations

Authorization
string
header
required

Server-side API Key; do not expose it in browser code.

Body

application/json
thread_id
string<uuid>

Optional UUID; generated when omitted.

assistant_id
string

Optional at the protocol level. For agent conversations, supply the target published agent ID at creation and use the same ID for subsequent runs. The TypeScript SDK parameter is assistantId. If omitted, the thread is created without an agent binding under the current request identity; a later run using a different execution identity can fail with 403. Binding does not grant additional conversation access.

if_exists
enum<string>
Available options:
raise,
do_nothing
metadata
object

Response

Successful response.

thread_id
string
required
status
string
required
created_at
string<date-time>
updated_at
string<date-time>
metadata
object
values
object