---
title: "Update a specific API key"
method: PATCH
path: "/v1/api-keys/{key_name}"
tags: ["API Keys"]
---

# Update a specific API key

`PATCH /v1/api-keys/{key_name}`

## Path parameters

- `key_name` string, required

## Request body

- ApiKeyUpdate
  - `name` string — The new name for the API key
  - `expires_at` string, date-time — The new expiration date and time for the API key

## Response `200`

API key updated successfully

- ApiKeyResponse
  - `id` string, uuid
  - `created_at` string, date-time
  - `last_used_at` string, date-time
  - `expires_at` string, date-time
  - `status` 'ACTIVE' | 'EXPIRED' | 'REVOKED'
  - `name` string
  - `prefix` string

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Resource not found

---

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