---
title: "Replace User"
method: PUT
path: "/api/users/{username}"
tags: ["Users"]
---

# Replace User

`PUT /api/users/{username}`

## Path parameters

- `username` string, required

## Request body

- UserPassword
  - `username` string, required — Username of the user.
  - `scope` 'admin' | 'install' | 'update' | 'read'
  - `totp_enabled` boolean — Whether two-factor authentication is enabled/required using TOTP. Not available if Passkey is used.
  - `passkey` boolean — Whether this user authenticates using a Passkey.
  - `limited` boolean — In case the user was authenticated with a passwordless link, the scope of the API token used for generating that link is inherited to the user session. This flag is `true` if the user would have more permissions than currently given by the passwordless link.
  - `password` string, password, required — Password of the user.

## Response `200`

User replaced

- User
  - `username` string — Username of the user.
  - `scope` 'admin' | 'install' | 'update' | 'read'
  - `totp_enabled` boolean — Whether two-factor authentication is enabled/required using TOTP. Not available if Passkey is used.
  - `passkey` boolean — Whether this user authenticates using a Passkey.
  - `limited` boolean — In case the user was authenticated with a passwordless link, the scope of the API token used for generating that link is inherited to the user session. This flag is `true` if the user would have more permissions than currently given by the passwordless link.

---

[API](https://skmtc.net/contao/apis/contao-manager-api.md) · [All operations](https://skmtc.net/contao/apis/contao-manager-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/contao/contao-manager-api/versions/074d8046de13/schema)
