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

# Update a user

`PATCH /reseller/companies/{company_uuid}/users/{uuid}`

## Request

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

Update a user of a client company. Only the attributes present in the body are updated. Unlike the regular endpoint, the email of a super admin or of a user whose company enforces SSO can be changed.

## Path parameters

- `company_uuid` string, required
- `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 the client 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. Unlike the regular endpoints, a reseller key may assign every role, `super_admin` and `system_admin` included, and advanced roles do not require the Governance add-on of the client company.
  - `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
- `401`: 401
- `402`: 402
- `403`: 403
- `404`: 404
- `422`: 422
- `429`: 429

---

[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)
