---
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

---

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