---
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/{handle}/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/{handle}/regenerate`

## Request

- Base URL: `https://api.clinicos.vet/backend/business`
- URL: `https://api.clinicos.vet/backend/business/api/tenants/{tenantId}/api-keys/{handle}/regenerate`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/docs/api/tenants/:tenantId/api-keys/:handle/regenerate/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `tenantId` string, required
- `handle` 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.dev/clinicos/apis/pawthosx-business-api-v1.md) - [All operations](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/revisions/099cf36186e0?raw)
