---
title: "Update an accountant user"
method: PATCH
path: "/admin/users/{id}"
tags: ["admin.users"]
---

# Update an accountant user

`PATCH /admin/users/{id}`

Updates an accountant user by ID.

## Path parameters

- `id` string, cuid, required — The ID of the item

## Request body

- UpdateAccountantUser
  - `role` union, required — Role to assign to the user. Can be 'admin', 'user', or a custom role ID.
    - 'admin' | 'user'
    - string, cuid

## Response `200`

Accountant user updated

- AccountantUser
  - `id` string, cuid, required — Identifier of the accountant user.
  - `createdAt` string, date-time, required — ISO 8601 timestamp when the accountant user record was created.
  - `email` string, email, required — Email address of the accountant user.
  - `firstName` string, nullable, required — First name of the accountant user, if provided.
  - `lastName` string, nullable, required — Last name of the accountant user, if provided.
  - `roles` AccountantUserRole[], required — Roles assigned to the accountant user.
    - `id` string, cuid, required — Identifier of the role assigned to the accountant user.
    - `name` string, nullable, required — Internal identifier of the role. Null when the role is custom only.
    - `customName` string, nullable, required — Custom label for the role, if defined.

## Other responses

- `401` — Unauthorized
- `404` — Accountant user or role not found
- `422` — The validation error(s)
- `429` — Rate limit exceeded
- `500` — Internal server error

---

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