latestSwagger 2.02026-08-1024042.7 KB

a3ea128a9743

Users

Update user

    Update a user's attributes.

    Setting the "terminated" field to "true" will mark this user as terminated, preventing them from logging into the application.

    This action can be undone by setting the "terminated" field to "false".

    Terminating a user will cancel any active reviews. Archived reviews will not be affected. 

    Users who are assigned as managers cannot be terminated, please reassign their direct reports first.

    Users who are assigned as managers and have direct reports cannot have their manager role removed, please reassign their direct reports first.
    
    Users with API keys will have their keys invalidated when terminated.
  
patch/api/v1/users/{id}

Path parameters

idstring required

Query parameters

includestring

value can be 'groups' to include user group information in results

Headers

Content-Typestring required

Request body

Example request

{
  "data": {
    "type": "users",
    "id": "5",
    "attributes": {
      "first_name": "Jane",
      "last_name": "Doe",
      "employee_number": "employee123",
      "username": "username1",
      "email": "my_email@example.com",
      "hire_date": "2019-09-29",
      "base_date": "2019-09-29",
      "password": "MyPassword!",
      "must_reset_password": true,
      "form_name": "Manager in training",
      "unrecognized_form_name_action": "copy",
      "form_name_for_copy": "Older form to Copy",
      "process_name": "Annual",
      "manager_user_id": "64",
      "review_archive_date": "2020-03-31",
      "terminated": true,
      "termination_date": "2019-09-29",
      "group_ids": [
        "1",
        "2",
        "3"
      ],
      "group_names": [
        {
          "group_type_name": "Location",
          "group_name": "Dragonstone"
        }
      ],
      "roles": [
        "admin",
        "manager"
      ],
      "locale_format": "en_GB",
      "locale_lang": "fr_CA"
    }
  }
}

Response

user updated