Skip to main content
POST

Authorizations

X-Agent-Id
string
header
required

The agent's UUID, from the agent's page in the web dashboard or GET /v1/agents.

X-Api-Key
string
header
required

A workspace API key (starts with hitl_). Shown once when an owner or admin creates it.

Body

application/json
question
string
required

One decision, phrased so a person can answer it from a lock screen.

Required string length: 1 - 500
context_markdown
string
required

Markdown shown under the question: what will happen, why, and how to undo it. <script> blocks and javascript: are removed.

Required string length: 1 - 2500
options
object[]
required
Required array length: 1 - 4 elements
notification_summary
string

Push notification text. HTML tags are removed.

Maximum string length: 120
request_id
string | null

Your id for this approval and its idempotency key, unique per agent. Trimmed; omit it, or send null or blank, and the server generates a UUID. Reusing it with the same body returns the existing approval; with a different body, 409.

Maximum string length: 120
correlation_id
string | null

Your id for the run, ticket or execution this approval belongs to. Not unique: many approvals can share one. Trimmed; null or blank means none. Returned in the result. Not part of the idempotency comparison: a retry with the same request_id and body but another correlation_id returns the existing approval, which keeps its original correlation_id.

Maximum string length: 120
timeout
object

Optional. Each field you send overrides only that part of the agent's defaults (new agents: 600 seconds, expire_no_action).

callback
object

Where to POST the result when the approval leaves pending. Use HTTPS. Add a secret header with the agent's Callback security tab, not here.

Response

Created, or an idempotent match for a request_id you already used

approval_id
string<uuid>
required

FinalSay's internal id. Poll with request_id, not this.

request_id
string
required

Your request_id, or the UUID the server generated.

status
enum<string>
required

pending: waiting. selected_option: someone picked an option. custom_instruction: someone wrote an answer. expired: nobody answered in time.

Available options:
pending,
selected_option,
custom_instruction,
expired
expires_at
string<date-time>
required
idempotent
boolean
required

true when this call matched an approval you already created with the same request_id. status and expires_at are then the existing approval's, so status may already be resolved.