API reference
Approve
POST /v1/agents/approve
View as MarkdownAnswers a pending approval that has isLinkOnly: false. The task continues as soon as the answer lands.
Request
json
{ "approvalId": "ap_7Qw", "response": "yes" }For a choice question:
json
{ "approvalId": "ap_9Lm", "response": "yes", "selections": [["desktop"]] }Response
json
{ "ok": true, "status": "approved" }status is approved, approved_task or denied.
Errors
Gotchas
- A choice approval with
response: "yes"and noselectionsis recorded as a deny. Always sendselectionsforapprovalType: "choice". selectionson a non-choice approval returns422.- Read
isLinkOnlybefore calling. Link-only approvals cannot be answered here.
Note
The
409 link_onlybody withapprovalUrlis available from October 1. Today's staging returns a bare400.