API Reference
Dashboard
  1. API Reference
  2. Box API
  3. API keys

Delete an API key

Use this to remove a key for good. It stops working at once, so every bot or rotation link that still uses it is refused with invalid_token. An expired key can be deleted. Available from XProxy v21.3.61.

  • Destructive · confirm first
  • Basic auth
  • Panel API · since v21.3.61
  • Hub: blocked by the Hub
  • deleteApiKey
POST/v2/api_keys/delete

Request body application/json · required

idintegerrequired

Key number from GET /v2/api_keys.

Authentication

Needs the admin login (HTTP Basic, or the panel session). An API key cannot manage API keys: any key sent here, even a valid Full access key, is refused with HTTP 401 invalid_token, also from the LAN. A browser request whose Origin is not the panel's own address is refused with HTTP 403 cross_origin; requests without an Origin header (curl, scripts) are not affected.

How authentication works: login, API keys, LAN and 401 answers →

Responses

Deleted, or the reason it was refused.

Errors returned in msg

msgMeaningWhat to do
not_foundNo key has this id, or id is not a whole number (code field, HTTP 200).Take the id from GET /v2/api_keys.
invalid_tokenAn API key was sent. Keys cannot manage keys (HTTP 401).Call this with the admin login and no key.
cross_originThe request came from a browser page on another origin (HTTP 403, in the code field).Open the panel itself
Verified against XProxy v21.3.61 on Dec 4, 2026