Restore a recently revoked dashboard API key
POST /api/keys/{id}/restore
Restores a recently revoked key owned by the authenticated account and reactivates it. The three-day restore window is reported as restorable_until by GET /api/keys; after it ends this operation returns 410 with error.code=window_closed. Requires keys.write and api-keys.revoke.
Authenticate with a portal session token.
Parameters
idinteger path required
Responses
200 The key was restored and reactivated.
application/json object
api_keyApiKeyResourceC6b requiredmessagestring requiredValue:"API key restored. It can sign calls again."
Generated sample
{
"api_key": {
"allowed_ips": [
"string"
],
"created_at": "2026-01-01T00:00:00Z",
"expires_at": "2026-01-01T00:00:00Z",
"id": 0,
"is_active": true,
"is_default": true,
"last_used_at": "2026-01-01T00:00:00Z",
"mirrors_account_settings": true,
"name": "string",
"permissions": [
"string"
],
"prefix": "string",
"privacy_tier_override": "balanced",
"rate_limit_rpm": 0
},
"message": "API key restored. It can sign calls again."
}401 Missing or invalid bearer token.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
403 Authenticated caller lacks required permission or ability.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
404 No revoked key with that ID is available in the recovery window.
application/json object
errorobject requiredcodestring requiredValue:"not_found"messagestring requiredValue:"No revoked key with that id in the recovery window."
410 The three-day restore window has ended; error.code is window_closed.
application/json object
errorobject requiredcodestring requiredValue:"window_closed"messagestring requiredValue:"The 3-day recovery window for this key has closed."
422 The privacy floor would be violated or the account already has the maximum of ten active API keys.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
429 The request was rate limited. API-generated responses are JSON;
Response headers
Retry-Afterstring headerSeconds to wait before retrying, when provided.
X-RateLimit-Scopestring headerIdentifies the scope of the request limit, when provided.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
text/html string