REST APIWaitlist open
Human approvals over a plain REST API
POST a question, get the answer back by callback or a GET. Any language.
curl https://api.finalsay-hitl.com/v1/approvals \
-H "X-Agent-Id: $FINALSAY_AGENT_ID" -H "X-Api-Key: $FINALSAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question":"Refund €640 for order #10482?",
"context_markdown":"Arrived damaged. Photos are in the ticket.",
"options":[{"label":"Refund","value":"refund"},{"label":"Decline","value":"decline"}]}'Set it up
Create an agent and a key
In the web dashboard. You see the key once.
POST the question
POST /v1/approvals with a question, optional Markdown context and up to four options.
Get the answer
Receive the callback, or GET the result.
sh curl https://api.finalsay-hitl.com/v1/approvals/$REQUEST_ID/result -H "X-Agent-Id: …" -H "X-Api-Key: …"
Result statuses
| status | Meaning |
|---|---|
| pending | Nobody has answered yet. |
| selected_option | Someone picked an option: selected_option_index, label and value. |
| custom_instruction | Someone wrote their own answer instead. |
| expired | Nobody answered in time. custom_instruction carries the fallback, if the agent has one. |
Details
Callbacks
Set a header name and secret per agent in the dashboard. FinalSay sends it on every callback, retries with exponential backoff, and calls you on expiry too. The body is the same result object the GET returns.
Idempotency
Send your own request_id. The same ID with the same body returns the same approval; the same ID with a different body is a conflict.
Field limits
| question | up to 500 characters |
|---|---|
| context_markdown | Markdown, up to 2,500 characters |
| notification_summary | up to 120 characters |
| options | 1 to 4; labels up to 120, values up to 500 |
| timeout | 30 seconds to 24 hours |
| fallback instruction | up to 1,000 characters |
| request_id, correlation_id | up to 120 characters each |
Good to know
- Question up to 500 characters, context up to 2,500, one to four options, a timeout from 30 seconds to 24 hours.
- Retries with the same request ID don’t use quota again.
- Anything that didn’t arrive shows up in Delivery health.
Questions
Are callbacks signed?
They carry a secret header you choose. Check it on your side.
Is there a rate limit?
Yes, per agent. You’ll get a 429 if you create approvals too fast.
Where’s the spec?
The OpenAPI spec is in the docs.