Skip to content

Update a user

PATCH
/users/{user_id}
user_id
required

User id

string
/^[1-9]\d*$/
Example
42
object
email

New work email. Omit for no change; cannot be set to null. Same validation as create; must not belong to another active user when changed.

string format: email
Example
first_name

Given name. Omit for no change; cannot be cleared via null.

string
>= 1 characters
Example
Ada
last_name

Family name. Omit for no change; cannot be cleared via null.

string
>= 1 characters
Example
Lovelace
phone

Contact phone. Omit for no change; cannot be cleared via null.

string
>= 1 characters
Example
+33123456789
phone_country

ISO 3166-1 alpha-2. Omit for no change; cannot be cleared via null.

string
Example
FR
language
Any of:
nullable
position
Any of:
nullable
arrival_date
Any of:
nullable
departure_date
Any of:
nullable
date_of_birth
Any of:
nullable
city_of_birth
Any of:
nullable
country_of_birth
Any of:
nullable
role

EMPLOYEE: standard company user. ADMIN: can manage company configuration and users. On create, defaults to EMPLOYEE when omitted.

string
Allowed values: EMPLOYEE ADMIN
Example
EMPLOYEE
team_ids

Ids of company teams to assign. Teams must already exist. On patch, replaces all current team memberships when provided.

Array<integer>
Example
[
12,
34
]

Updated user

object
data
required
object
id
required
integer
email
required
string
nullable
secondary_email
required
string
nullable
first_name
required
string
nullable
last_name
required
string
nullable
phone
required
string
nullable
phone_country
required
string
nullable
language
required
string
nullable
position
required
string
nullable
role
required

EMPLOYEE: standard company user. ADMIN: can manage company configuration and users. On create, defaults to EMPLOYEE when omitted.

string
Allowed values: EMPLOYEE ADMIN
Example
EMPLOYEE
arrival_date
required
string
nullable
departure_date
required
string
nullable
date_of_birth
required
string
nullable
city_of_birth
required
string
nullable
country_of_birth
required
string
nullable
teams
required

Teams the user belongs to, sorted by label.

Array<object>
object
id
required
integer
label
required
string