---
title: "Regenerate API key"
method: POST
path: "/api/v1/me/api-keys/{id}/regenerate"
tags: ["API Keys"]
---

# Regenerate API key

`POST /api/v1/me/api-keys/{id}/regenerate`

## Request

- Base URL: `https://api.proof.holdings`
- URL: `https://api.proof.holdings/api/v1/me/api-keys/{id}/regenerate`
- Auth: API key in cookie `auth_token`

Issue a new key (a new id and secret) with the same name, environment, scopes and project, replacing this one. The old key stops working immediately. The new key lists the old one in `replaced_key_ids`, so its requests and usage stay with the integration.

## Path parameters

- `id` string, required: MongoDB ObjectId

## Response `201`

API key regenerated (the new key is shown only once)

- APIKeyCreatedResponse: A newly created or regenerated API key, with its full value — the one response that carries it.
  - `id` string, required: MongoDB ObjectId
  - `key` string, required: The full API key. Returned only in this response; it cannot be read again.
  - `name` string, required
  - `prefix` string, required
  - `environment` 'production' | 'test', required
  - `scopes` string[], required
  - `profile_id` string, required: MongoDB ObjectId
  - `created_at` string, date-time, required
  - `warning` string, required

## Other responses

- `404`: API key not found, or revoked or regenerated meanwhile

---

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