---
title: "Pause or resume API keys"
method: PATCH
path: "/api/v1/api-keys"
tags: ["API Keys"]
---

# Pause or resume API keys

`PATCH /api/v1/api-keys`

## Request

- Base URL: `https://xquik.com`
- URL: `https://xquik.com/api/v1/api-keys`
- Auth: API key in cookie `__Host-xquik_session`

Pauses or resumes up to 100 of your API keys at once & lists the keys it changed, newest first. It skips revoked, expired, unknown & other accounts' keys. Pausing again keeps the first pause time.

## Request body

- object
  - `ids` string[], required
  - `paused` boolean, required: true pauses every listed key, so their calls get 403 `api_key_paused`. false resumes them at once.

## Response `200`

API keys paused or resumed

- object
  - `keys` ApiKey[], required: The keys it changed, newest first.
    - `id` string, required
    - `name` string, required
    - `prefix` string, required
    - `scope` 'full' | 'paid_reads', required: full calls every route an API key can use. paid_reads calls paid X reads plus the routes of its scopes. Other routes answer it with 403.
    - `scopes` string[], required: The scopes the key holds, such as read & monitors. A Full access key holds full.
    - `allowedIps` string[], required: The IPs & CIDR ranges the key accepts calls from. An empty list accepts any IP. The API returns each range with host bits cleared, IPv6 in short form and IPv4-mapped IPv6 as IPv4.
    - `isActive` boolean, required
    - `createdAt` string, date-time, required
    - `expiresAt` string, date-time: When the key stops working. Missing when it never expires.
    - `lastUsedAt` string, date-time: When the key last made a request. Missing until it does.
    - `monthlyBudgetCredits` integer: Credits the key can spend each UTC calendar month. Missing when the key has no budget. A call that doesn't fit what's left gets 403 `api_key_budget_reached` & costs nothing. A refused call never runs. A read with a `limit` needs that many results' price left, & a media download needs the price of every post it names. A read without a `limit`, an extraction, a draw & a style refresh return only what fits. A write needs its price plus 20 credits left, & it charges only what it uses. Calls running at once can't take the key past its budget. A started call bills what it delivered, even past a lowered budget.
    - `monthlySpentCredits` integer, required: Credits charged for calls with the key this UTC calendar month. Once it reaches the budget, every call with the key gets 403 `api_key_budget_reached` until the next UTC month or a higher budget, even a retry with a used Idempotency-Key.
    - `pausedAt` string, date-time: When the key was paused. Missing while it works. A paused key gets 403 `api_key_paused` on every call.

## Other responses

- `400`: Invalid input. A value past its maxLength gets this answer, & the message names the field & its limit. Bad input costs nothing, since it's refused before any read.
- `401`: Unauthenticated
- `403`: An API key or OAuth token called a route that needs a dashboard session. Sign in at dashboard.xquik.com/account instead.
- `429`: Too many requests right now. Each user gets 500 reads a second. Each minute allows 120 writes & 60 deletes. `x_api_rate_limited` means X limits this read for now. Neither answer costs anything. Wait for the seconds in `Retry-After`, then retry.
- `500`: Unexpected error.
- `default`: Unexpected error.

## Changes

- **2026-10-31** `2e8e935f1661`: 1 info
  - endpoint added
- **2026-10-31** `c57c57352955`: 1 breaking
  - api path removed without deprecation
- **2026-10-30** `02f0b86fb58d`: 1 breaking
  - api path removed without deprecation
- **2026-10-30** `d7a994ca1067`: 1 info
  - endpoint added
- **2026-10-30** `722bcc0a4fec`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/xquik-dev/apis/xquik-api/changes/api/v1/api-keys/patch.md)

---

[API](https://skmtc.dev/xquik-dev/apis/xquik-api.md) - [All operations](https://skmtc.dev/xquik-dev/apis/xquik-api/llms.txt) - [OpenAPI document](https://skmtc.dev/xquik-dev/apis/xquik-api/revisions/2e8e935f1661?raw)
