---
title: "Create a user"
method: POST
path: "/reseller/companies/{company_uuid}/users"
---

# Create a user

`POST /reseller/companies/{company_uuid}/users`

## Request

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

Create a user in a client company. When the client company has no active super admin, the new user becomes its super admin. The user receives a welcome email with a link to set their password, unless `send_welcome_email` is `false`.

## Path parameters

- `company_uuid` string, required

## Request body

- object
  - `active` boolean: Defaults to `true` on creation. Set to `false` to deactivate the user.
  - `email` string, required: 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, required: 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.
  - `send_welcome_email` boolean: Defaults to `true`. Set to `false` to create the user without sending them the welcome email.
  - `team_uuid` string, required: 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
- `409`: 409
- `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)
