Skip to content

Human-in-the-Loop

List Hitl Requests

List an organization’s HITL requests, newest first.

Defaults to pending — the questions still waiting on a human. Pass status to read the history instead. The value is typed, so FastAPI rejects anything outside :data:HitlStatus with a 422 before the handler runs; a filter this endpoint cannot honour is never silently dropped.

Parameters

NameInTypeRequiredDescription
limitqueryintegerno
offsetqueryintegerno
org_idpathstring (uuid)yes
statusquery"pending" | "approved" | "rejected" | "responded" | "cancelled" | "expired"noReturn only requests with this status. Omit for the pending inbox (the default). An unrecognised value is rejected with 422 rather than quietly falling back to pending.

Responses

StatusDescriptionBody
200Successful ResponseHitlListResponse
422Validation ErrorHTTPValidationError

GET /api/orgs/{org_id}/hitl-requests/{request_id}

Section titled “GET /api/orgs/{org_id}/hitl-requests/{request_id}”

Get Hitl Request

Get a single HITL request.

Parameters

NameInTypeRequiredDescription
org_idpathstring (uuid)yes
request_idpathstring (uuid)yes

Responses

StatusDescriptionBody
200Successful ResponseHitlRequestResponse
422Validation ErrorHTTPValidationError

POST /api/orgs/{org_id}/hitl-requests/{request_id}/respond

Section titled “POST /api/orgs/{org_id}/hitl-requests/{request_id}/respond”

Respond To Hitl Request

Respond to a pending HITL request and resume the chat.

Parameters

NameInTypeRequiredDescription
org_idpathstring (uuid)yes
request_idpathstring (uuid)yes

Request body (required)

FieldTypeRequiredDescription
actionstringno
selectionstringno
selectionsobjectno
textstringno

Responses

StatusDescriptionBody
200Successful ResponseHitlRequestResponse
422Validation ErrorHTTPValidationError