Skip to main content
PATCH https://xquik.com/api/v1/api-keys/{id} Rename a key so its owner is clear. Narrow a key that only reads to paid_reads. Pause a key to stop it for a while, then resume it. Limit a key to your servers with allowedIps. Cap what a key spends each month with monthlyBudgetCredits. Send 1 or more of name, scope, paused, allowedIps & monthlyBudgetCredits. The key keeps its secret, prefix and expiry.
Free. This endpoint does not consume credits.

Path parameters

Headers

Body

Send at least 1 field.

Response

200 OK

Returns the saved key with the same fields as List API keys.

400 Invalid input

{ "error": "invalid_input", "message": "Send name, scopes, paused, allowedIps or monthlyBudgetCredits to change." } The body had no field to change, or scope was not full or paid_reads. A scopes entry that was not a scope fails too. So does a name longer than 100 characters. An allowedIps entry that isn’t an IP or CIDR range fails too. So does a list over 20 entries. monthlyBudgetCredits must be null or a whole number from 1 to 1,000,000,000,000. Xquik changes nothing.

401 Unauthenticated

Missing, expired, or invalid dashboard session cookie.

404 Not found

No active API key with this ID exists on your account. A revoked key cannot change.

429 Rate limited

Too many requests. Wait for the Retry-After header before retrying.
API key changes require a same-origin dashboard session. API keys and OAuth bearer tokens cannot change account keys.Related. Create API Key · List API Keys · Revoke API Key

Response examples

  • 400 { "error": "invalid_input", "message": "Invalid input. Check the request body." }
  • 401 { "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." }
  • 403 { "error": "session_required", "message": "API keys & OAuth tokens cannot use this route. Sign in at dashboard.xquik.com/account instead." }
  • 404 { "error": "not_found", "message": "Resource not found." }
  • 409 { "error": "api_key_revoked", "message": "This API key is revoked. Create a new key at dashboard.xquik.com/api-keys." }
  • 429 { "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }