---
title: "Update a user"
method: PUT
path: "/users/{id}"
tags: ["Users"]
---

# Update a user

`PUT /users/{id}`

Partial update. Requires admin role.

## Request body

- UserCreate
  - `username` string, required
  - `email` string, email, required
  - `password` string, password, required
  - `role` 'admin' | 'viewer', required
  - `allowed_subclient_ids` integer[] — Sub-client IDs this user may access.

## Response `200`

User updated.

- UserProfile
  - `id` integer
  - `username` string
  - `email` string, email
  - `full_name` string
  - `role` 'admin' | 'viewer'
  - `client_id` integer
  - `two_factor_enabled` boolean

## Other responses

- `404` — User not found.

---

[API](https://skmtc.dev/netcorecloud/apis/email-api-v6.md) · [All operations](https://skmtc.dev/netcorecloud/apis/email-api-v6/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/netcorecloud/email-api-v6/revisions/73f83bc2eff8/schema)
