Update a user
patch/api/v1/users/{id}Updates one or more field values for an existing user. Supports updating personal information, contact details, role assignments, reporting structure, and account settings.
Code snippet
curl -X 'PATCH' \
'https://{yourdomain}/api/v1/users/{id}' \
-H 'accept: text/plain; x-api-version=1.0' \
-H 'x-api-key: {your API key}' \
-H 'Content-Type: application/json-patch+json; x-api-version=1.0' \
-d '{
"data": {
"firstName": "John",
"lastName": "Smith",
"reportsTo": {
"id": 101
},
"status": {
"id": 2
},
"timezone": {
"id": 15
},
"role": {
"id": 2
},
"permissionSet": {
"id": 1
}
}
}'
Path parameters
| idintegerRequired | Unique identifier of the user to update. Must be a valid user ID that exists in the organization. |
Request body
| firstNamestring | First name of the user. Used for display purposes and identification within the organization. | ||
| lastNamestring | Last name of the user. Combined with first name for full display name and identification. | ||
reportsToobject | Manager or supervisor that this user reports to in the organizational hierarchy.
| ||
statusobject | Current status of the user account such as Active or Inactive.
| ||
timezoneobject | The user's time zone, used to display dates and times in local time.
| ||
roleobject | Role assignment that defines the user's job function and responsibilities.
| ||
permissionSetobject | Permission set that defines access levels and capabilities for the user account.
|
Example response
200 Success
{
"message": "User updated successfully.",
"data": {
"id": 1234
}
}