Use this to see which API keys exist, when they expire and when each was last used. It returns only the masked form of each key, never the full key. Newest key first. Available from XProxy v21.3.61.
Panel API — may change between versions. The box dashboard uses this route; prefer the public v1 routes in long-lived scripts.
Read only
Basic auth
Panel API · since v21.3.61
Hub: blocked by the Hub
listApiKeys
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.
Key number. Use it to regenerate or delete the key.
data.items[].namestringrequired
Label given when the key was created (1-40 characters).
data.items[].typestringrequired
full is a Full access key (xpf_…), rotate is a Rotate only key (xpr_…).
One offull, rotate
data.items[].maskedstringrequired
The key prefix and its last 4 characters, for example xpr_…ab12.
data.items[].created_atintegerrequired
Creation time as UTC epoch milliseconds.
data.items[].expires_atinteger | nullrequired
Expiry time as UTC epoch milliseconds, or null when the key never expires.
data.items[].last_used_atinteger | nullrequired
Last time the key was accepted as UTC epoch milliseconds (updated at most once a minute), or null when it was never used.
data.items[].expiredbooleanrequired
True when the expiry time has passed. An expired key is refused; it can be deleted but not regenerated.
data.maxintegerrequired
Most keys a box can hold.
Either an API key was sent and refused (invalid_token), or no key was sent and the caller is not trusted and sent no valid Basic credentials (the same refusals as other routes). invalid_token is the same body for an unknown, expired, deleted, regenerated, malformed or wrong-type key, so it never tells which. It is answered from every address, including the LAN, loopback, a whitelisted IP and Tailscale. Also sent with WWW-Authenticate and Cache-Control: no-store.
A browser request from another origin.
statusbooleanrequired
codestringrequired
msgstringrequired
Errors returned in msg
msg
Meaning
What to do
invalid_token
An API key was sent. Keys cannot manage keys (HTTP 401).
Call this with the admin login and no key.
cross_origin
The request came from a browser page on another origin (HTTP 403, in the code field).