Skip to content
REST APIWaitlist open

Human approvals over a plain REST API

POST a question, get the answer back by callback or a GET. Any language.

terminal
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

  1. Create an agent and a key

    In the web dashboard. You see the key once.

  2. POST the question

    POST /v1/approvals with a question, optional Markdown context and up to four options.

  3. 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

statusMeaning
pendingNobody has answered yet.
selected_optionSomeone picked an option: selected_option_index, label and value.
custom_instructionSomeone wrote their own answer instead.
expiredNobody 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
questionup to 500 characters
context_markdownMarkdown, up to 2,500 characters
notification_summaryup to 120 characters
options1 to 4; labels up to 120, values up to 500
timeout30 seconds to 24 hours
fallback instructionup to 1,000 characters
request_id, correlation_idup 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.

Get it the day it opens

Free to start. You’ll get one email, the day it opens.

Which integration will you use first?