---
title: "Disable API key"
method: POST
path: "/account/api/{key}/disable"
tags: ["api-keys"]
---

# Disable API key

`POST /account/api/{key}/disable`

Disables an API key.

The `{key}` path parameter is the secret key (`token`) of the API key to disable.

You cannot disable your last remaining active key, as one must always be kept active.

A `master` key can only be disabled from the Dashboard.

## Path parameters

- `key` string, required

## Response `200`

API key disabled

- ApiKeyResult
  - `success` boolean
  - `key` ApiKeyObject
    - `created` integer — Creation date of the key, as a Unix timestamp in milliseconds.
    - `name` string — The name given to the key.
    - `removed` integer — Date at which the key was disabled, as a Unix timestamp in milliseconds. Null if the key is active.
    - `token` string — The secret API key. Use this value to authenticate requests.
    - `public` string — The public identifier of the key, used for converting templates.
    - `last_used` integer — Date at which the key was last used, as a Unix timestamp in milliseconds. Null if never used.
    - `usage` integer — Number of conversions performed with this key over the last 7 days.
    - `is_master` boolean — Whether this key has master privileges.

## Other responses

- `400` — Bad request. You cannot disable all keys, as one must be kept active.
- `401` — Unauthorized. Invalid auth key, missing, or disabled.
- `403` — Forbidden. A master key can only be disabled from the Dashboard.
- `404` — The requested key was not found.
- `429` — Too Many Requests. You have been rate limited.
- `500` — Internal Server Error.

---

[API](https://skmtc.dev/pdfshift/apis/pdfshift-api-documentation.md) · [All operations](https://skmtc.dev/pdfshift/apis/pdfshift-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pdfshift/pdfshift-api-documentation/revisions/0b8cbae61b89/schema)
