---
title: "Regenerates an API key (creates a new key and revokes the old one).
IMPORTANT: The new API key is only returned once. Store it securely."
method: POST
path: "/api/tenants/{tenantId}/api-keys/{keyHash}/regenerate"
tags: ["ApiKeys"]
---

# Regenerates an API key (creates a new key and revokes the old one).
IMPORTANT: The new API key is only returned once. Store it securely.

`POST /api/tenants/{tenantId}/api-keys/{keyHash}/regenerate`

## Path parameters

- `tenantId` string, required
- `keyHash` string, required

## Response `200`

OK

- CreateApiKeyResponse
  - `apiKey` string, required
  - `keyHash` string, required
  - `keyPrefix` string, required
  - `tenantId` string, required
  - `name` string, required
  - `scopes` string[], required
  - `createdAt` string, date-time, required

## Other responses

- `404` — Not Found

---

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