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 protected]",
  "password": "password"
}
'
{
  "data": {
    "type": "users",
    "id": 1,
    "attributes": {
      "name": "John Doe",
      "email": "[email protected]",
      "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"
      }
    }
  ]
}

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.

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