Deactivate Sub-Agent Key
x402_revoke_delegate_keyPermanently deactivate one sub-agent key by delegate_id, or all active sub-keys when revoke_all=true. Use this to retire an unused or compromised sub-key; do not use for a temporary account-wide pause (x402_set_account_freeze) or budget edits (x402_update_delegate_key). Parameters: pass delegate_id or revoke_all=true (revoke_all takes priority if both are set); supply your main spend_key or header (mismatch -> HTTP 400). Behavior: permanent — deactivated keys immediately return HTTP 401. Safe to retry; returns HTTP 403 for sub-keys and HTTP 404 if unknown.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "x402_revoke_delegate_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Optional audit-log reason recorded on swarm revocations when revoke_all=true (e.g. "key_rotated" or "compromised_worker"). | |
| spend_key | No | Master Stripe account spend key (format: sbk_<43+ chars>). Delegated subagent keys are rejected with HTTP 403. Optional if supplied via the x-atlas-spend-key HTTP header. | |
| revoke_all | No | Set true to immediately deactivate every active sub-agent key on the account at once (omit delegate_id when true). | |
| delegate_id | No | Unique delegated subagent key identifier returned by x402_issue_delegate_key or x402_get_account (format: sbd_<16 hex chars>, e.g. sbd_1122334455667788). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when revocation succeeded. | |
| revoked | No | True when a single delegated key was revoked. | |
| revoked_count | No | Number of delegated keys revoked when revoke_all=true. |