Skip to main content
POST
/
company
/
users
Create Company User
curl --request POST \
  --url https://api.nuwebgroup.com/v1/company/users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "John Doe",
  "email": "email@example.com",
  "password": "password"
}
'
{
  "data": {
    "type": "users",
    "id": 1,
    "attributes": {
      "name": "John Doe",
      "email": "john.doe@example.com",
      "phone": null,
      "phone_code": null,
      "createdAt": "2021-11-22T11:59:00.000000Z",
      "updatedAt": "2021-11-22T11:59:00.000000Z"
    },
    "relationships": {
      "companyUsers": {
        "data": [
          {
            "type": "companyUsers",
            "id": 1
          }
        ]
      },
      "visibilityGroups": {
        "data": [
          {
            "type": "visibilityGroups",
            "id": 1
          }
        ]
      }
    }
  },
  "included": [
    {
      "type": "companyUsers",
      "id": 1,
      "atributes": {
        "isSelected": true,
        "locale": null,
        "acceptedTermsAt": null,
        "acceptedPrivacyAt": null,
        "acceptedEmailOptInAt": null,
        "createdAt": "2021-11-22T11:59:00.000000Z",
        "updatedAt": "2021-11-22T11:59:00.000000Z"
      }
    },
    {
      "type": "visibilityGroups",
      "id": 1,
      "atributes": {
        "name": "Bristol Office",
        "createdAt": "2021-11-22T11:59:00.000000Z",
        "updatedAt": "2021-11-22T11:59:00.000000Z"
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.nuwebgroup.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The 'Bearer' token can be obtained from the token management interface or via the login endpoint using your admin user credentials.

Headers

X-NU-COMPANY-ID
integer

The ID of the company this operation should be performed against.

Accept-Language
string

Sets the preferred language for localised response content (e.g. en, fr, de). If the requested language is not supported by the company, the company fallback language will be assumed.

Body

application/json

Request body for creating a company user.

name
string
email
string
password
string

This field is optional, allowing you to create a user without a password. This user will be able to set their own password using the forgot password functionality when logging in.

registrationSource
enum<string>

This field is optional, allowing you to specify the users registration source. If left empty it will default to api.

Available options:
web,
api,
app

Response

Successfully created the company user.

data
object
included
object[]