Skip to main content
Agent endpoints are in beta. MPP equivalent: GET /agent/mpp/api-keys/revoke?api_key=... (this x402 route uses DELETE). Overview: Agentic payments.
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 /agent/x402/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


Request flow

  1. Call DELETE /agent/x402/api-keys/revoke?api_key=<key> with no payment → 402 Payment Required with $0.001 USDC.
  2. Sign the payment and retry with an x-payment header → 200 OK with { "deleted": true }.
404 — No agent for this wallet, or the given api_key does not belong to this agent.

Reference scripts

Uses the same wallet as for subscribe. Set API_KEY to the key you want to revoke.
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: x402 Create API key. Full walkthrough: x402 Subscription and top-up.