curl -X POST "https://win.oneshotagent.com/v1/approvals/appr_01J.../cancel" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-H "x-agent-proof: <base64 signed proof, scope=write>"
{
"success": true,
"data": {
"approval_id": "appr_01J...",
"source": "api",
"tool": null,
"status": "cancelled",
"action_summary": "Send the signed LOI to Acme",
"preview": {
"contact": "[email protected]"
},
"policy_rule": null,
"approver": {
"channel": "email",
"address": "o***@acme.com"
},
"expires_at": "2026-10-19T13:00:00.000Z",
"use_by": null,
"decided_at": "2026-10-19T12:05:00.000Z",
"decided_via": "api",
"decision_note": null,
"decision_receipt_id": "rcpt_01J...",
"consumed_at": null,
"notified": true,
"notify_error": null,
"compute": null,
"created_at": "2026-10-19T12:00:00.000Z"
}
}
Approvals
Cancel approval
Withdraw a pending approval
POST
/
v1
/
approvals
/
{id}
/
cancel
curl -X POST "https://win.oneshotagent.com/v1/approvals/appr_01J.../cancel" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-H "x-agent-proof: <base64 signed proof, scope=write>"
{
"success": true,
"data": {
"approval_id": "appr_01J...",
"source": "api",
"tool": null,
"status": "cancelled",
"action_summary": "Send the signed LOI to Acme",
"preview": {
"contact": "[email protected]"
},
"policy_rule": null,
"approver": {
"channel": "email",
"address": "o***@acme.com"
},
"expires_at": "2026-10-19T13:00:00.000Z",
"use_by": null,
"decided_at": "2026-10-19T12:05:00.000Z",
"decided_via": "api",
"decision_note": null,
"decision_receipt_id": "rcpt_01J...",
"consumed_at": null,
"notified": true,
"notify_error": null,
"compute": null,
"created_at": "2026-10-19T12:00:00.000Z"
}
}
Authentication
X-Agent-ID plus a signed x-agent-proof with scope: "write". See proof authentication.
curl -X POST "https://win.oneshotagent.com/v1/approvals/appr_01J.../cancel" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-H "x-agent-proof: <base64 signed proof, scope=write>"
Parameters
string
required
Approval ID belonging to this agent. Only pending approvals can be cancelled.
Response
200 returns the approval object with status: "cancelled".
{
"success": true,
"data": {
"approval_id": "appr_01J...",
"source": "api",
"tool": null,
"status": "cancelled",
"action_summary": "Send the signed LOI to Acme",
"preview": {
"contact": "[email protected]"
},
"policy_rule": null,
"approver": {
"channel": "email",
"address": "o***@acme.com"
},
"expires_at": "2026-10-19T13:00:00.000Z",
"use_by": null,
"decided_at": "2026-10-19T12:05:00.000Z",
"decided_via": "api",
"decision_note": null,
"decision_receipt_id": "rcpt_01J...",
"consumed_at": null,
"notified": true,
"notify_error": null,
"compute": null,
"created_at": "2026-10-19T12:00:00.000Z"
}
}
404 approval_not_found means it does not exist or belongs to another agent. 409 approval_not_pending means it is already decided, expired or cancelled.