v3

latestOpenAPI 3.1.02026-07-3178343213.9 KB
threads

Create an agent thread

Creates a new agent thread for running agent workflows

post/v1/threads

Headers

Authorizationstring required

Bearer authentication

Request body

typestring required

The agent type to use for this agent thread

business_idstring uuid

Business to use as context for the thread. Shorthand for context_type=business. Required unless context_type and context_id are provided.

context_typestring

The type of context resource (e.g., "business")

context_idstring uuid

The ID of the context resource. Must be provided with context_type.

Response

agent thread created with context_type and context_id

objectstring required

Object type identifier.

idstring uuid required

Unique identifier for the agent thread.

created_atstring date-time required

Timestamp when the agent thread was created.

updated_atstring date-time required

Timestamp when the agent thread was last updated.

status'running' | 'completed' | 'error' | 'interrupted' required

Current lifecycle status of the agent thread.

metadataobject nullable

Internal metadata associated with the agent thread.

requesterobject nullable

Requester context associated with the agent thread.