---
title: "Update an API Key"
method: PATCH
path: "/api_keys/{apiKeyID}"
tags: ["API Keys"]
---

# Update an API Key

`PATCH /api_keys/{apiKeyID}`

## Path parameters

- `apiKeyID` string, required

## Request body

- object
  - `claims` unknown
  - `scopes` string[]
  - `description` string, nullable
  - `subject` string
  - `seconds_until_expiration` number, nullable

## Response `200`

200 OK

- object
  - `object` 'api_key', required
  - `id` string, required
  - `type` string, required
  - `subject` string, required
  - `name` string, required
  - `description` string, nullable
  - `claims` unknown, required
  - `scopes` string[], required
  - `revoked` boolean, required
  - `revocation_reason` string, nullable, required
  - `expired` boolean, required
  - `expiration` number, nullable, required — The timestamp for when the API key will expire, in milliseconds
  - `created_by` string, nullable, required
  - `last_used_at` number, nullable, required — The timestamp for when the API key was last used, in milliseconds
  - `created_at` number, required — The timestamp for when the API key was created, in milliseconds
  - `updated_at` number, required — The timestamp for when the API key was last updated, in milliseconds

## Other responses

- `400` — 400 Bad Request
- `404` — 404 Not Found

---

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