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

# Update a user

`PUT /users/{userId}`

## Path parameters

- `userId` string, required

## Request body

- User
  - `email` string, required — The email address of the user, this must be unique.
  - `password` string — The password of the user if using password based login - this will never be returned. This can be left out of subsequent requests (updates) and will be enriched back into the user structure.
  - `status` 'active' — The status of the user, if they are active.
  - `firstName` string — The first name of the user
  - `lastName` string — The last name of the user
  - `forceResetPassword` boolean — If set to true forces the user to reset their password on first login.
  - `builder` object — Describes if the user is a builder user or not. This field can only be set on a business or enterprise license.
    - `global` boolean — If set to true the user will be able to build any app in the system.
  - `admin` object — Describes if the user is an admin user or not. This field can only be set on a business or enterprise license.
    - `global` boolean — If set to true the user will be able to administrate the system.
  - `roles` object — Contains the roles of the user per app (assuming they are not a builder user). This field can only be set on a business or enterprise license.

## Response `200`

Returns the updated user.

- UserOutput
  - `data` object, required
    - `email` string, required — The email address of the user, this must be unique.
    - `password` string — The password of the user if using password based login - this will never be returned. This can be left out of subsequent requests (updates) and will be enriched back into the user structure.
    - `status` 'active' — The status of the user, if they are active.
    - `firstName` string — The first name of the user
    - `lastName` string — The last name of the user
    - `forceResetPassword` boolean — If set to true forces the user to reset their password on first login.
    - `builder` object — Describes if the user is a builder user or not. This field can only be set on a business or enterprise license.
      - `global` boolean — If set to true the user will be able to build any app in the system.
    - `admin` object — Describes if the user is an admin user or not. This field can only be set on a business or enterprise license.
      - `global` boolean — If set to true the user will be able to administrate the system.
    - `roles` object — Contains the roles of the user per app (assuming they are not a builder user). This field can only be set on a business or enterprise license.
    - `_id` string, required — The ID of the user.

## Changes

> 51 revisions in range; 2 could not be searched.

- **2023-09-27** `7400aae8fd5c` — 1 breaking, 1 info
  - the response property `data/roles` became optional for the status `200`
  - the request property `roles` became optional
- **2023-09-21** `ea23baac3b30` — 1 breaking, 1 info
  - the request property `roles` became required
  - the response property `data/roles` became required for the status `200`
- **2023-09-20** `8ff141936638` — 1 breaking, 1 info
  - the response property `data/roles` became optional for the status `200`
  - the request property `roles` became optional
- **2023-08-15** `44fbe9f14200` — 1 breaking, 5 info
  - added the new required request property `roles`
  - added the new optional request property `admin`
  - added the new optional request property `builder`
  - added the optional property `data/admin` to the response with the `200` status
  - …2 more
- **2023-08-04** `9f4851dfc828` — 1 breaking, 5 warning
  - removed the required property `data/roles` from the response with the `200` status
  - removed the request property `admin`
  - removed the request property `builder`
  - removed the request property `roles`
  - …2 more

[Change history](https://skmtc.dev/budibase/apis/budibase-api/changes/users/:userId/put.md)

---

[API](https://skmtc.dev/budibase/apis/budibase-api.md) · [All operations](https://skmtc.dev/budibase/apis/budibase-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/budibase/budibase-api/revisions/9c6f16fc652b/schema)
