Tutorial: Your first approval
This tutorial ties together creating an approval from an automation and resolving it as a human, then getting the result back to your workflow.What you need
- Agent ID and workspace API key from the web dashboard or mobile app (Credentials).
- Base URL for the Agent API.
- Permission to open Approvals on the web or Approval Inbox on mobile.
1. Create an approval
SendPOST {BASE_URL}/v1/approvals with headers:
X-Agent-Id— your agent UUIDX-Api-Key— your workspace keyContent-Type: application/json
question, context_markdown, and options are required. timeout is optional—the server merges your agent’s default timeout when you omit it. request_id is optional (the API assigns a UUID if you omit it).
You can use curl, the Quickstart “custom” snippet, n8n, or Zapier.
Save the response if you need approval_id or timing fields; for polling, use the request_id returned in the create response (whether you supplied one or not).
2. Respond as a human
- Open Approvals in the web dashboard, or the Approval Inbox / agent inbox on mobile.
- Open the pending request, read the question and context, then choose an option or enter custom text if allowed.
3. Get the result to your automation
Pick one:- Callback — If you set
callback.urlon create, the service POSTs the final JSON when the approval resolves. Point it at a reachable webhook (for example in n8n). - Polling — Call
GET {BASE_URL}/v1/approvals/{requestId}/resultwhere{requestId}is therequest_idfrom the create response. Repeat untilstatusis no longerpending.