---
title: "Regenerate Api Key"
method: POST
path: "/api/v1/mcp/api-key/regenerate"
tags: ["MCP API Keys"]
---

# Regenerate Api Key

`POST /api/v1/mcp/api-key/regenerate`

## Request

- Base URL: `https://backend.caspr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://backend.caspr.ai/api/v1/mcp/api-key/regenerate`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

Regenerate the user's MCP API key (invalidates the previous one).

## Response `200`

Successful Response

- McpApiKeyCreateResponse
  - `success` boolean
  - `api_key` string, required: Plaintext key — shown only once
  - `meta` McpApiKeyMeta, required
    - `id` string, required
    - `key_prefix` string, required
    - `last_four` string, required
    - `created_at` string, nullable
    - `updated_at` string, nullable
    - `last_used_at` string, nullable
  - `message` string, required

## Other responses

- `401`: Unauthorized
- `500`: Internal Server Error

---

[API](https://skmtc.dev/caspr/apis/casper-api.md) - [All operations](https://skmtc.dev/caspr/apis/casper-api/llms.txt) - [OpenAPI document](https://skmtc.dev/caspr/apis/casper-api/revisions/f9765e3aa00c?raw)
