Skip to main content
POST
/
company
/
users
/
update
Update Company User
curl --request POST \
  --url https://api.nuwebgroup.com/v1/company/users/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": 1,
  "name": "John Doe",
  "email": "email@example.com",
  "password": "password",
  "acceptedTerms": true,
  "acceptedPrivacy": true,
  "acceptedEmailOptIn": true,
  "roles": [
    1
  ],
  "visibilityGroups": [
    1
  ]
}
'
{
  "data": {
    "type": "users",
    "id": 1,
    "attributes": {
      "name": "John Doe",
      "email": "john.doe@example.com",
      "phone": "07123456789",
      "phoneCode": "44",
      "createdAt": "2021-11-22T11:59:00.000000Z",
      "updatedAt": "2021-11-22T11:59:00.000000Z"
    },
    "relationships": {
      "companyUsers": {
        "data": [
          {
            "type": "companyUsers",
            "id": 1
          }
        ]
      },
      "roles": {
        "data": [
          {
            "type": "roles",
            "id": 1
          }
        ]
      },
      "visibilityGroups": {
        "data": [
          {
            "type": "visibilityGroups",
            "id": 1
          }
        ]
      }
    }
  },
  "included": [
    {
      "type": "companyUsers",
      "id": 1,
      "atributes": {
        "isSelected": true,
        "locale": null,
        "acceptedTermsAt": "2021-11-22T11:59:00.000000Z",
        "acceptedPrivacyAt": "2021-11-22T11:59:00.000000Z",
        "acceptedEmailOptInAt": "2021-11-22T11:59:00.000000Z",
        "createdAt": "2021-11-22T11:59:00.000000Z",
        "updatedAt": "2021-11-22T11:59:00.000000Z"
      }
    },
    {
      "type": "roles",
      "id": 1,
      "attributes": {
        "title": "Role title"
      }
    },
    {
      "type": "visibilityGroups",
      "id": 1,
      "attributes": {
        "name": "Bristol Group",
        "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 updating a company user.

id
integer
name
string
email
string
password
string
acceptedTerms
boolean
acceptedPrivacy
boolean
acceptedEmailOptIn
boolean
roles
integer[]

Array of role IDs to assign to the user.

Response

Successfully updated the company user.

data
object
included
object[]