---
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.

---

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