Skip to main content
POST
Ask the copilot of an audit

Authorizations

X-API-Key
string
header
required

Your API key in the X-API-Key header.

Headers

X-Audit-Id
string | null

Optional id of the audit the client expects to be reading. If it does not match the audit_id in the path, the response is 400 audit_id_mismatch and nothing is read.

X-Case-Id
string | null

Active case, optional: the token of a case you can view. The query is recorded in that case and also uses its own labels. A case that does not exist, was deleted or is no longer shared with you returns 400 case_unavailable and the query is not run, with no charge.

Path Parameters

audit_id
string
required

Audit id: lowercase letters, digits, _ and -, 1 to 64 characters, as listed by GET /v1/audit.

Body

application/json
message
string
required

La pregunta del usuario.

Required string length: 1 - 4000
history
History · object[]

Turnos previos {role: user|assistant, content} de esta conversación (se usan los últimos 12).

Maximum array length: 40
context
Context · object | null

La pantalla: {section, selection: {kind: finding|lead|proof, id}}. Se valida contra la auditoría: lo que no existe en ella se ignora.

Response

SSE stream (text/event-stream) with the start, token, tool, tool_result, notice, error and done events.