---
title: "Rotaciona uma API key (gera nova, marca antiga como rotacionada)"
method: POST
path: "/v1/api-keys/{id}/rotate"
tags: ["api-keys"]
---

# Rotaciona uma API key (gera nova, marca antiga como rotacionada)

`POST /v1/api-keys/{id}/rotate`

## Path parameters

- `id` string, uuid, required

## Response `200`

Nova chave em texto plano

- GeneratedApiKey
  - `plainTextKey` string, required — Chave em texto plano. **Só aparece uma vez** — guarde antes de fechar a tela.

## Other responses

- `401` — Token ausente ou inválido
- `404` — Recurso não encontrado

## Changes

- **2026-05-25** `4e426b85f784` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ararahq/apis/ararahq-api/changes/v1/api-keys/:id/rotate/post.md)

---

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