---
title: "Regenerate API key for an API user"
method: POST
path: "/v3/api_users/{id}/regenerate_api_key"
tags: ["Deprecated End Points"]
---

# Regenerate API key for an API user

`POST /v3/api_users/{id}/regenerate_api_key`

Regenerate API key for an API user.

## Path parameters

- `id` integer, required — Uniquely identify a user.

## Response `200`

Successfully generated new API key.

- ApiUserWithKey
  - `id` integer, required — Uniquely identify a user.
  - `name` string, required
  - `username` string, required
  - `email` string, required
  - `avatar` string, nullable, required — URL of the user's avatar.
  - `organizations` object[], required
    - `identifier` string, required — Uniquely identify an organization.
    - `name` string, required
  - `apiKey` string, required — Use this key to authenticate with the API.
  - `apiKeyLastChars` string — The last 4 characters of the API key.

## Other responses

- `400` — Bad request. If it is a validation error will contain a list of each invalid field
- `401` — Authorisation error
- `default` — UnexpectedError

---

[API](https://skmtc.net/affinda/apis/affinda-api-2.md) · [All operations](https://skmtc.net/affinda/apis/affinda-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/affinda/affinda-api-2/versions/6772e50cb58e/schema)
