---
title: "POST /agents/{id}/rotate-key"
method: POST
path: "/agents/{id}/rotate-key"
---

# POST /agents/{id}/rotate-key

`POST /agents/{id}/rotate-key`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/agents/{id}/rotate-key`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Path parameters

- `id` string, required: Unique agent identifier

## Request body

- object: API key rotation parameters

## Response `200`

OK

- object: Rotated API key credentials
  - `apiKey` string, required: Newly generated API key
  - `apiKeyPrefix` string, required: Prefix of the new API key for identification

---

[API](https://skmtc.dev/useanima/apis/anima-api.md) · [All operations](https://skmtc.dev/useanima/apis/anima-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanima/apis/anima-api/revisions/aaa148188980?raw)
