API ReferenceMerchant agent

Approve a held action

POST
/console/api/approve

Records a named person's approval for the approval id in the inbox, then runs the case again so the agent takes only the step the approval names. The approval store refuses a decided, expired or self approval.

Authorization

consoleSession csrfToken
clearwake_console<token>

Set by GET /console/api/session. HttpOnly, SameSite=Strict, 8 hours.

In: cookie

X-Clearwake-CSRF<token>

The csrf value from GET /console/api/session, an HMAC of the session id. Required on every POST.

In: header

Request Body

application/json

The approval id and the approver's name.

The body of approve: which approval, and who approves.

approval_id*string

The approval id from the inbox, a UUID.

Match^[0-9a-f-]{36}$
approver*string

The approver's name, 2 to 60 letters.

Match^[A-Za-z][A-Za-z .'()-]{1,59}$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/console/api/approve" \  -H "Content-Type: application/json" \  -d '{    "approval_id": "00000000-0000-0000-0000-000000000000",    "approver": "Sri B"  }'
{  "id": "PP-D-REH-94816C42B4",  "key": "n",  "run": "b38ce4",  "title": "Settle in conversation before escalation: offer inside the limit, PayPal record checked",  "at": "2026-11-11T07:17:29Z",  "kind": "PayPal dispute",  "label": "local run data",  "state": "VERIFIED",  "action": "settle_by_offer",  "detail": "Settled, no fee: PayPal shows RESOLVED (RESOLVED_WITH_PAYOUT) at the INQUIRY stage, never a claim.",  "refund_id": null,  "approval_id": null,  "proposed": "settle_by_offer",  "model": "scripted, not AI",  "decided": "settle_by_offer",  "offer": "2.50",  "dispatch": null,  "claim": null,  "gateway": "completed",  "adapter": "console",  "history": [    {      "at": "2026-11-11T07:17:29Z",      "state": "PENDING",      "action": "settle_by_offer",      "detail": "Offer sent. PayPal shows WAITING_FOR_BUYER_RESPONSE; waiting for the buyer.",      "note": ""    },    {      "at": "2026-11-11T07:17:29Z",      "state": "VERIFIED",      "action": "settle_by_offer",      "detail": "Settled, no fee: PayPal shows RESOLVED (RESOLVED_WITH_PAYOUT) at the INQUIRY stage, never a claim.",      "note": "The buyer accepted the offer (the local provider records it; in the sandbox the buyer accepts in PayPal's Resolution Center)."    }  ],  "dispute_id": "PP-D-REH-94816C42B4",  "reason": "MERCHANDISE_OR_SERVICE_NOT_AS_DESCRIBED",  "amount_minor": 250,  "capture": "CAP-N-b38ce4",  "capture_minor": 900,  "customer": "buyer-n-b38ce4",  "order": "ORDER-N-b38ce4",  "due": "2026-11-21T07:17:29.805243Z",  "message": "The colour is wrong.",  "use_trackers": false,  "receipt_digest": null,  "deadline": {    "seconds_left": 863999,    "state": "ok"  },  "sources": []}