# Create User

**POST** `/organizations/users`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Creates a new user. Users created this way are not granted access to the Dashboard, and can only be authenticated using the [Authenticate Whitelabel User](/reference/organizations/authenticate-whitelabel-user) api. The user must be created with at least one permission assignment: either account_permissions, account_group_permissions, or both.

## Authorization

- PUBLIC-API-KEY (apiKey in header)
- PRIVATE-SECRET-KEY (apiKey in header)

## Body

Content type: `application/json`

- `email` (string<email>, required)
  User email address.
- `first_name` (string, required)
  First name.
- `last_name` (string, required)
  Last name.
- `account_permissions` (object[])
  Direct account permission assignments.
  - `account_id` (string<uuid>, required)
    Account UUID (must belong to the org).
  - `role_id` (string, required)
    Role ID (non-admin, non-staff, org-scoped).
- `account_group_permissions` (object[])
  Account group permission assignments.
  - `account_group_id` (string<uuid>, required)
    Account group UUID (must belong to the org).
  - `role_id` (string, required)
    Role ID (non-admin, non-staff, org-scoped).

Example:

```json
{
  "email": "user@example.com",
  "first_name": "string",
  "last_name": "string",
  "account_permissions": [
    {
      "account_id": "00000000-0000-0000-0000-000000000000",
      "role_id": "string"
    }
  ],
  "account_group_permissions": [
    {
      "account_group_id": "00000000-0000-0000-0000-000000000000",
      "role_id": "string"
    }
  ]
}
```

## Responses

### 201

Created

- `id` (string<uuid>)
- `email` (string)
- `first_name` (string)
- `last_name` (string)
- `account_permissions` (object[])
  - `account_id` (string<uuid>)
  - `role_id` (string)
- `account_group_permissions` (object[])
  - `account_group_id` (string<uuid>)
  - `role_id` (string)
- `created_at` (string<date-time>)
- `updated_at` (string<date-time>)

Example:

```json
{
  "id": "00000000-0000-0000-0000-000000000000",
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "account_permissions": [
    {
      "account_id": "00000000-0000-0000-0000-000000000000",
      "role_id": "string"
    }
  ],
  "account_group_permissions": [
    {
      "account_group_id": "00000000-0000-0000-0000-000000000000",
      "role_id": "string"
    }
  ],
  "created_at": "1970-01-01T00:00:00.000Z",
  "updated_at": "1970-01-01T00:00:00.000Z"
}
```