Create User

POST/organizations/users

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 api. The user must be created with at least one permission assignment: either account_permissions, account_group_permissions, or both.

Body application/json

emailstring<email>required

User email address.

first_namestringrequired

First name.

last_namestringrequired

Last name.

account_permissionsobject[]

Direct account permission assignments.

Show account_permissions properties
account_idstring<uuid>required

Account UUID (must belong to the org).

role_idstringrequired

Role ID (non-admin, non-staff, org-scoped).

account_group_permissionsobject[]

Account group permission assignments.

Show account_group_permissions properties
account_group_idstring<uuid>required

Account group UUID (must belong to the org).

role_idstringrequired

Role ID (non-admin, non-staff, org-scoped).

Response

Created

idstring<uuid>
emailstring
first_namestring
last_namestring
account_permissionsobject[]
Show account_permissions properties
account_idstring<uuid>
role_idstring
account_group_permissionsobject[]
Show account_group_permissions properties
account_group_idstring<uuid>
role_idstring
created_atstring<date-time>
updated_atstring<date-time>
Request
curl -X POST "https://api-sandbox.whitelabel.com/v1/organizations/users" \
  -H "Content-Type: application/json" \
  -H "PUBLIC-API-KEY: <PUBLIC-API-KEY>" \
  -H "PRIVATE-SECRET-KEY: <PRIVATE-SECRET-KEY>" \
  -d '{
  "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"
    }
  ]
}'
Response
{
  "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"
}