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

# Update API key

`PATCH /api-keys/{id}`

Updates a single API key. You can update the keys name, description, status, and rate limit. You cannot mutate the actual key itself.

## Path parameters

- `id` string, required

## Headers

- `X-API-Version` string, required

## Request body

- UpdateApiKeyDtoV1
  - `name` string — Name of an API key.
  - `description` string — Description for an API key.
  - `status` 'enabled' | 'disabled' — Set API key status. Use to enable or disable an API key.
  - `rate_limit` number — Set rate limit for an API key. Value is in request-per-second.

## Response `200`

Updated API key object.

- 43bcdb2376818c770704c
  - `data` ApiKeyResponseDtoV2, required
    - `id` string, required — Auto-generated ID for an API key
    - `name` string, required — API key name
    - `description` string — API key description
    - `status` 'enabled' | 'disabled', required — API key status, indicates if an API keys is enabled or disabled.
    - `environment` object, nullable, required — ID of an environment the API key belongs to.
    - `type` 'public' | 'secret' | 'proxy', required — Type of an API key.
    - `token` string — Value of an API key. This field is immutable, and for secret keys it's only visible upon creation.
    - `rate_limit` number, required — Current limit in requests-per-second for the API key.
    - `created_at` string, date-time, required — Date when API key was created.
    - `disabled_at` string, date-time — Date when API key was disabled.

## Other responses

- `400` — Error: API key can't be updated due to validation errors.
- `401` — Error: Invalid API key.
- `404` — Error: API key with the given ID was not found.
- `429` — Error: API key has exceeded its rate limit.

---

[API](https://skmtc.net/fingerprint/apis/management-api.md) · [All operations](https://skmtc.net/fingerprint/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fingerprint/management-api/versions/b17eccec9d47/schema)
