Skip to content
Sign in Create account

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

  • id integer path required

Responses

200 The key was restored and reactivated.

application/json object

  • api_key ApiKeyResourceC6b required
  • message string required
    Value: "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

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

403 Authenticated caller lacks required permission or ability.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

404 No revoked key with that ID is available in the recovery window.

application/json object

  • error object required
    • code string required
      Value: "not_found"
    • message string required
      Value: "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

  • error object required
    • code string required
      Value: "window_closed"
    • message string required
      Value: "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

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

429 The request was rate limited. API-generated responses are JSON;

Response headers

  • Retry-After string header

    Seconds to wait before retrying, when provided.

  • X-RateLimit-Scope string header

    Identifies the scope of the request limit, when provided.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

text/html string