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 protected]",
"password": "password",
"acceptedTerms": true,
"acceptedPrivacy": true,
"acceptedEmailOptIn": true,
"roles": [
1
],
"visibilityGroups": [
1
]
}
'{
"data": {
"type": "users",
"id": 1,
"attributes": {
"name": "John Doe",
"email": "[email protected]",
"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"
}
}
]
}Update a 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 protected]",
"password": "password",
"acceptedTerms": true,
"acceptedPrivacy": true,
"acceptedEmailOptIn": true,
"roles": [
1
],
"visibilityGroups": [
1
]
}
'{
"data": {
"type": "users",
"id": 1,
"attributes": {
"name": "John Doe",
"email": "[email protected]",
"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"
}
}
]
}The 'Bearer' token can be obtained from the token management interface or via the login endpoint using your admin user credentials.
Request body for updating a company user.