x402 agent endpoints are in beta. For the full flow and reference scripts, see x402 Agent Subscription and Top-Up.
Agents only. This endpoint is for agents (wallet-based, programmatic access). Dashboard customers manage API keys at admin.mobula.io, not via this x402 endpoint.
DELETE /x402/agent/api-keys/revoke revokes (soft-deletes) an API key that belongs to your agent. The key must belong to the same agent as the paying wallet. Cost: $0.001 USDC (facilitator fee). You must have an active plan.
Query parameters
| Parameter | Required | Description |
|---|---|---|
api_key | Yes | The API key to revoke (must belong to this agent) |
Request flow
- Call
DELETE /x402/agent/api-keys/revoke?api_key=<key>with no payment → 402 Payment Required with $0.001 USDC. - Sign the payment and retry with an
x-paymentheader → 200 OK with{ "deleted": true }.
api_key does not belong to this agent.
Reference scripts
Uses the same wallet as for subscribe. SetAPI_KEY to the key you want to revoke.
- Solana
- EVM (Base)
Prerequisites: Solana wallet with USDC for $0.001 and SOL for fees.Full script (uses
@solana/kit, @x402/core, @x402/svm). Inline base58ToBytes below, or use import { base58ToBytes } from './base58.ts' when running from scripts/src/x402/.To create a new API key: Create Agent API Key. Full walkthrough: x402 Agent Subscription and Top-Up.