---
title: "Update a user"
method: PATCH
path: "/users/{uuid}"
---

# Update a user

`PATCH /users/{uuid}`

## Request

- Base URL: `https://public-api.leexi.ai/v1`
- URL: `https://public-api.leexi.ai/v1/users/{uuid}`
- Auth: API key in header `Authorization`

Update a user. Only the attributes present in the body are updated.

## Path parameters

- `uuid` string, required

## Request body

- object
  - `active` boolean: Defaults to `true` on creation. Set to `false` to deactivate the user.
  - `email` string: The user's email address. It must be deliverable and not already used in any Leexi company.
  - `license` string: Either `free` or your company's own license category. Any other value is ignored.
  - `name` string: The user's full name.
  - `roles` string[]: Role names. Defaults to `["member"]` on creation. Privileged roles (`super_admin`, `system_admin`, `billing_manager`) cannot be assigned through the API; grant them from Leexi > Settings > Users.
  - `team_uuid` string: The uuid of the team the user belongs to.

## Response `200`

200

- object
  - `data` object
    - `active` boolean
    - `created_at` string
    - `email` string
    - `license` string
    - `name` string
    - `roles` string[]
    - `team` object
      - `active` boolean
      - `name` string
      - `uuid` string
    - `updated_at` string
    - `uuid` string
  - `message` string
  - `success` boolean

## Other responses

- `400`: 400
- `403`: 403
- `404`: 404
- `422`: 422

---

[API](https://skmtc.dev/leexi/apis/leexi-public-api.md) · [All operations](https://skmtc.dev/leexi/apis/leexi-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/leexi/apis/leexi-public-api/revisions/3d10e45c30f5?raw)
