Skip to main content

You’ll need

1. Create the approval

Response
question, context_markdown and options are required. Everything else is optional: leave out request_id and the server generates one (returned in the response), and leave out timeout to use the agent’s default (10 minutes for a new agent). All fields: The approval object.

2. Answer it

Your phone gets a push notification titled Agent name: Deploy approval. Open it, or open Approvals in the web dashboard, then pick Approve or Reject, or tap Write your own answer. Only the first answer counts.

3. Read the result

Poll with the request_id:
Before anyone answers you get { "request_id": "my-first-approval", "status": "pending" }. Afterwards:
Branch on selected_option_value. If status is custom_instruction, follow what they wrote; if it’s expired, don’t proceed.
Instead of polling, add "callback": { "url": "https://…" } and FinalSay POSTs this same object to your URL when the approval is answered or expires. See Callbacks.

Try it again

Run step 1 again with the same body: you get the same approval back with "idempotent": true, not a second approval. Change the question but keep request_id, and you get 409 idempotency_conflict. That’s what makes retries safe; see Idempotency and retries.