> ## Documentation Index
> Fetch the complete documentation index at: https://docs.finalsay-hitl.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The approval object

> Every field you send to create an approval, every field you get back, and the limits on each.

These limits are the same everywhere: the API, the CLI, MCP, n8n and Zapier all check them with the same schema.

## Request body

`POST /v1/approvals`

**question** `string` *required*

One decision, phrased so someone can answer it from a lock screen. 1–500 characters.

**context\_markdown** `string` *required*

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

**options** `object[]` *required*

The choices, 1–4 of them, in the order you want them shown.

**option**

**label** `string` *required*

The button text. 1–120 characters.

**value** `string` *required*

What your code gets back as `selected_option_value`. 1–500 characters.

**notification\_summary** `string`

A short title for the push notification, up to 120 characters; HTML tags are removed. The notification reads
"*Agent name*: *summary*" with the question underneath. Without it, the title is "*Agent name* needs assistance".

**request\_id** `string`

Your id for this approval, unique per agent, and its **idempotency key**. 1–120 characters after trimming. Omit it
(or send `null` or blank) and the server generates a UUID. Send the same id with the same body to retry safely; a
different body returns `409`. See [Idempotency and retries](https://docs.finalsay-hitl.com/best-practices/idempotency.md).

**correlation\_id** `string`

Your id for the run, ticket or execution this approval belongs to. Not unique: many approvals can share one.
1–120 characters after trimming; `null` or blank means none. Returned in the result.

**timeout** `object`

Optional. Each field you send overrides only that part of the agent's defaults (set on the agent's **General**
tab; new agents start at 10 minutes with no fallback).

**timeout**

**expires\_in\_seconds** `integer`

How long people have to answer. 30–86400 (30 seconds to 24 hours).

**mode** `string`

`expire_no_action` (the result is `expired` with no instruction) or `expire_with_predefined_instruction` (the
result is `expired` and `custom_instruction` carries your fallback).

**predefined\_instruction** `string | null`

The fallback instruction, up to 1000 characters. Required (non-blank, after merging with the agent's defaults)
when `mode` is `expire_with_predefined_instruction`. Sending `null` clears the agent's default for this approval.

**callback** `object`

Where to POST the result when the approval leaves `pending`.

**callback**

**url** `string` *required*

A URL FinalSay can reach. Use HTTPS.

**headers** `object`

Extra **non-secret** headers, such as a trace id. Put a secret header on the agent's **Callback security** tab
instead: it's added on the server and never travels in your request. See [Callbacks](https://docs.finalsay-hitl.com/best-practices/callbacks.md).

> [!NOTE]
>
> MCP tools don't accept `timeout`: approvals created over MCP always use the agent's defaults. Every other
> integration can override them per request.

## Create response

**approval\_id** `string`

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

**request\_id** `string`

Yours, or the UUID the server generated. Use it for every later call.

**status** `string`

`pending` for a new approval. On an idempotent replay, the existing approval's status, which may already be resolved.

**expires\_at** `string`

When the approval expires (ISO 8601, UTC).

**idempotent** `boolean`

`true` when this call matched an approval you already created with the same `request_id`.

## Result

`GET /v1/approvals/{requestId}/result` returns `{ "request_id": "…", "status": "pending" }` until the approval is
answered or expires. Then it returns the full result below. The body POSTed to your `callback.url` is exactly the
same object.

**request\_id** `string`

**agent\_id** `string`

The agent's UUID.

**correlation\_id** `string | null`

What you sent, or `null`.

**status** `string`

`selected_option`, `custom_instruction` or `expired`. See [status values](#status-values).

**selected\_option\_index** `integer | null`

**Zero-based** position of the chosen option in the `options` you sent.

**selected\_option\_label** `string | null`

The chosen option's label.

**selected\_option\_value** `string | null`

The `value` you sent for the chosen option. Branch on this.

**custom\_instruction** `string | null`

What the reviewer wrote instead of picking an option. On an `expired` approval with a fallback instruction, the
fallback text.

**fallback\_applied** `boolean`

`true` when nobody answered and `custom_instruction` holds the approval's fallback instruction. `false` otherwise,
including an `expired` approval with no fallback. Branch on this instead of checking `status` and
`custom_instruction` together.

**answer** `string | null`

The answer in one field: the chosen option's `value`, what the reviewer wrote, or on an `expired` approval the
fallback instruction. `null` when it expired with no fallback, and while `pending`. Branch on this when you don't
need to know how the answer was given.

**resolved\_by** `object | null`

Who answered: `{ "user_id", "name" }`, where `name` is their display name if they set one. `null` when the approval
expired.

**resolved\_at** `string`

When it was answered or expired (ISO 8601, UTC).

```json Example: an option was chosen theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "request_id": "deploy-v2.4-prod",
  "agent_id": "4f1c…",
  "correlation_id": "run-8812",
  "status": "selected_option",
  "selected_option_index": 0,
  "selected_option_label": "Approve",
  "selected_option_value": "approve",
  "custom_instruction": null,
  "fallback_applied": false,
  "answer": "approve",
  "resolved_by": { "user_id": "9b2e…", "name": "Ana" },
  "resolved_at": "2026-11-21T10:01:00.000Z"
}
```

```json Example: nobody answered, with a fallback theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "request_id": "deploy-v2.4-prod",
  "agent_id": "4f1c…",
  "correlation_id": "run-8812",
  "status": "expired",
  "selected_option_index": null,
  "selected_option_label": null,
  "selected_option_value": null,
  "custom_instruction": "Nobody answered. Do not deploy.",
  "fallback_applied": true,
  "answer": "Nobody answered. Do not deploy.",
  "resolved_by": null,
  "resolved_at": "2026-11-21T10:30:00.000Z"
}
```

## Status values

| `status` | Meaning | What your agent should do |
| - | - | - |
| `pending` | Waiting for an answer. | Keep waiting. Don't act. |
| `selected_option` | Someone picked an option. | Act on `selected_option_value`. |
| `custom_instruction` | Someone wrote an answer instead. | Follow `custom_instruction`, or stop and tell a person. |
| `expired` | Nobody answered before `expires_at`. | Don't proceed. Follow the fallback in `custom_instruction` if there is one. |

Only one answer counts. If two people answer at once, the first one wins and the later answer is ignored.

## Callback delivery fields

`GET /v1/approvals/{requestId}` returns the status plus whether the result reached your callback:

| Field | Values |
| - | - |
| `result_delivery_status` | `delivered` (your URL returned 2xx), `failed` (every attempt failed), or `pending` (not delivered yet, or no callback was set). |
| `result_delivery_error` | The last error, such as the HTTP status and the start of the response body, or `null`. |

Owners and admins can see every delivery attempt on the dashboard's **Delivery health** page.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.