---
title: "Rotate Api Key"
method: POST
path: "/api/v1/auth/keys/rotate"
tags: ["Authentication"]
---

# Rotate Api Key

`POST /api/v1/auth/keys/rotate`

## Request

- Base URL: `https://cryptodataapi.com`
- URL: `https://cryptodataapi.com/api/v1/auth/keys/rotate`
- Auth: API key in header `X-API-Key`

Rotate the current API key. Invalidates the old key.

## Response `200`

Successful Response

- APIKeyRotateResponse: Response after rotating an API key.
  - `api_key` string, required
  - `key_prefix` string, required
  - `message` string

---

[API](https://skmtc.dev/cryptodataapi/apis/crypto-data-api.md) · [All operations](https://skmtc.dev/cryptodataapi/apis/crypto-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cryptodataapi/apis/crypto-data-api/revisions/8628b754ca81?raw)
