---
title: "Update API key"
method: PUT
path: "/account/api/{key}"
tags: ["api-keys"]
---

# Update API key

`PUT /account/api/{key}`

Updates the `name` of an existing API key.

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

This endpoint only works with an API key with the `master` privilege.

## Path parameters

- `key` string, required

## Request body

- ApiKeyForm
  - `name` string — A human-friendly name to identify the API key.

## Response `200`

API key updated

- 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. The request body was empty or invalid.
- `401` — Unauthorized. Invalid auth key, missing, or disabled.
- `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)
