---
title: "Create a user"
method: POST
path: "/users"
---

# Create a user

`POST /users`

## Request

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

Create a user in your workspace. The user receives a welcome email with a link to set their password, unless `send_welcome_email` is `false`.

## 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 your 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. Privileged roles (`super_admin`, `system_admin`, `billing_manager`) cannot be assigned through the API; grant them from Leexi > Settings > Users.
  - `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
- `403`: 403
- `404`: 404
- `409`: 409

---

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