---
title: "Regenerate an API key"
method: POST
path: "/api-keys/{key_id}/regenerate"
tags: ["api-keys"]
---

# Regenerate an API key

`POST /api-keys/{key_id}/regenerate`

Rotates the plaintext value for an existing API key, preserving its name and identifier. The previous value is invalidated immediately.

## Path parameters

- `key_id` string, uuid, required — API key identifier to regenerate

## Response `200`

OK

- APIKeyRegenerateResponse — Response returned when an API key is regenerated.
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `created_at` string, date-time, required — Timestamp when the key was originally created.
  - `id` string, required — API key identifier.
  - `key_value` string, required — New full plaintext key.
  - `name` string, required — Human-readable label for the key.
  - `regenerated_at` string, date-time, required — Timestamp when the key was regenerated.

## Other responses

- `default` — Error

## Changes

- **2026-07-23** `5a989777701c` — 1 breaking
  - for the `path` request parameter `key_id`, the format changed from no format to `uuid`

[Change history](https://skmtc.dev/axilioai/apis/axilio-api/changes/api-keys/:key_id/regenerate/post.md)

---

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