---
title: "Regenerate Api Key"
method: PUT
path: "/v1/web/api-accounts/{account_id}/regenerate-api-key"
tags: ["Web API Accounts"]
---

# Regenerate Api Key

`PUT /v1/web/api-accounts/{account_id}/regenerate-api-key`

## Request

- Base URL: `https://api.hydraai.ru` (the document declares no server; this is the origin it was published from)
- URL: `https://api.hydraai.ru/v1/web/api-accounts/{account_id}/regenerate-api-key`
- Auth: none declared

## Path parameters

- `account_id` integer, required

## Request body

- SensitiveActionConfirmRequest
  - `challenge_id` string, uuid, required
  - `code` string, required
  - `token` string, nullable
  - `recovery` boolean

## Response `200`

Successful Response

- RegeneratedApiKey
  - `api_key` string, required
  - `key_masked` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-04** `42d3d2735311`: 3 info
  - added the new optional request property `recovery`
  - added the new optional request property `token`
  - the `code` request property's maxLength was increased from `32` to `64`

[Operation history](https://skmtc.dev/hydraai/apis/hydraai-api/changes/v1/web/api-accounts/:account_id/regenerate-api-key/put.md)

---

[API](https://skmtc.dev/hydraai/apis/hydraai-api.md) - [All operations](https://skmtc.dev/hydraai/apis/hydraai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hydraai/apis/hydraai-api/revisions/42d3d2735311?raw)
