Skip to content

Chats

List Work Chats

List work chats with pagination and outcome-based stats.

Stats: throughput = count(SUCCESS outcomes), efficiency = avg cost per SUCCESS outcome.

Parameters

NameInTypeRequiredDescription
agent_idquerystring (uuid)no
org_idpathstring (uuid)yes
pagequeryintegerno
per_pagequeryintegerno
sincequerystringnoTime period for stats: 24h, 7d, 30d
sort_byquerystringnoSort field: created_at, completed_at, total_cost_usd, title
sort_orderquerystringnoasc or desc
statusquerystringno
tagsquerystring[]noFilter by tags (ALL must match)

Responses

StatusDescriptionBody
200Successful ResponseChatWorkListResponse
422Validation ErrorHTTPValidationError

Create Work Chat

Create a new work chat (manual trigger).

Validates the agent, checks for prompt injection, determines initial ChatStatus based on execution mode, and emits chat.work_created to Hatchet when the chat is ACTIVE.

Parameters

NameInTypeRequiredDescription
org_idpathstring (uuid)yes

Request body (required)

FieldTypeRequiredDescription
agent_idstring (uuid)yes
descriptionstringno
tagsstring[]no
titlestringno

Responses

StatusDescriptionBody
201Successful ResponseChatWorkResponse
422Validation ErrorHTTPValidationError

Get Work Chat

Get a single work chat detail.

Parameters

NameInTypeRequiredDescription
chat_idpathstring (uuid)yes
org_idpathstring (uuid)yes

Responses

StatusDescriptionBody
200Successful ResponseChatWorkResponse
422Validation ErrorHTTPValidationError

Delete Work Chat

Soft-delete a work chat.

Parameters

NameInTypeRequiredDescription
chat_idpathstring (uuid)yes
org_idpathstring (uuid)yes

Responses

StatusDescriptionBody
204Successful Response
422Validation ErrorHTTPValidationError

GET /api/orgs/{org_id}/chats/{chat_id}/outcomes

Section titled “GET /api/orgs/{org_id}/chats/{chat_id}/outcomes”

List Outcomes

List all outcomes recorded for a chat.

Parameters

NameInTypeRequiredDescription
chat_idpathstring (uuid)yes
org_idpathstring (uuid)yes

Responses

StatusDescriptionBody
200Successful ResponseOutcomeListResponse
422Validation ErrorHTTPValidationError

POST /api/orgs/{org_id}/chats/{chat_id}/outcomes

Section titled “POST /api/orgs/{org_id}/chats/{chat_id}/outcomes”

Create Outcome

Record an outcome against a chat (manual / override).

Parameters

NameInTypeRequiredDescription
chat_idpathstring (uuid)yes
org_idpathstring (uuid)yes

Request body (required)

FieldTypeRequiredDescription
evidencestringno
goalstringyes
statusstringno
summarystringno

Responses

StatusDescriptionBody
201Successful ResponseOutcomeResponse
422Validation ErrorHTTPValidationError

PATCH /api/orgs/{org_id}/chats/{chat_id}/tags

Section titled “PATCH /api/orgs/{org_id}/chats/{chat_id}/tags”

Update Chat Tags

Update tags on a work chat.

Parameters

NameInTypeRequiredDescription
chat_idpathstring (uuid)yes
org_idpathstring (uuid)yes

Request body (required)

FieldTypeRequiredDescription
tagsstring[]yes

Responses

StatusDescriptionBody
200Successful Responsestring[]
422Validation ErrorHTTPValidationError