Skip to content

Update user

Request to update an existing user:

PUT /api/v2/users/<user-id>.json

The request body contains the attributes of the user object to change. Attributes that are not included keep their values, including the attributes inside a fieldset.

For example:

{
    "user": {
        "name": "New User Name",
        "fieldset_recording": {
            "extensions": ["2001", "2002", "2003"]
        }
    }
}

Sections that the role of the API user is not allowed to edit are ignored. tenant_id cannot be changed.

Response contains HTTP status code as shown in the following table.

Response Description
200 OK The user has been successfully updated. The response body contains the complete user object after the update
400 Bad Request

The request cannot be completed because the supplied JSON object has invalid data.

The response contains a detailed description of the error, like:

{"error": "InvalidRecord", "explanation": "Record Validation errors", "details": {"name": "User with such name exists already"}}
403 Forbidden The request cannot be completed because API user has no permission to edit users
404 Not Found User with such ID does not exist, or it is outside the access scope of the API user