---
title: "POST /regeneratekeys"
method: POST
path: "/regeneratekeys"
tags: ["Account"]
---

# POST /regeneratekeys

`POST /regeneratekeys`

Regenerates either the primary or secondary key of the Managed Event Hub, if it is provisioned.

## Query parameters

- `api-version` string, required

## Request body

- AccessKeyOptions — A access key options used for regeneration.
  - `keyType` 'PrimaryAtlasKafkaKey' | 'SecondaryAtlasKafkaKey' — The access key type.

## Response `200`

Success

- AccessKeys — The Account access keys.
  - `atlasKafkaPrimaryEndpoint` string — Gets or sets the primary connection string.
  - `atlasKafkaSecondaryEndpoint` string — Gets or sets the secondary connection string.

## Other responses

- `default` — An error response received from the provider.

## Changes

- **2026-07-13** (2019-11-01-preview) `dc51c3b3ddf7` — 1 info
  - api operation id `Accounts_RegenerateAccessKey` removed and replaced with `Accounts_RegenerateAccessKeys`

[Change history](https://skmtc.dev/azure/apis/purview-account/changes/regeneratekeys/post.md)

---

[API](https://skmtc.dev/azure/apis/purview-account.md) · [All operations](https://skmtc.dev/azure/apis/purview-account/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/purview-account/revisions/dc51c3b3ddf7/schema)
