Users

Update user by ID

Changed on

Updates user fields (name, surname, email, roleId, last_login). Only provided fields are updated. Organization isolation enforced. Sends Slack notification on role change. Sends email notification when role changes from Editor (3) to Admin (1).

patch/users/{id}

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/users/{id}
  • Auth
    HTTP bearer

Path parameters

idinteger required

User ID to update

Request body

namestring

First name

surnamestring

Last name

emailstring email
roleIdinteger

New role ID (1=Admin, 2=Reviewer, 3=Editor, 4=Auditor). Can be sent as string.

last_loginstring date-time

Override last login timestamp

Example request

{
  "name": "Jane",
  "surname": "Smith",
  "email": "jane@example.com",
  "roleId": 1
}

Response

User updated

messagestring

Example response

{
  "message": "Accepted",
  "data": {
    "id": 1,
    "name": "John",
    "surname": "Doe",
    "email": "john@example.com",
    "role_id": 1,
    "organization_id": 1
  }
}

Changes

    • breaking

      the response property / became nullable for the status

    • breaking

      removed the required property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      api operation id updateUserById was added

    • info

      api tag Users added

    • info

      api tag Users - CRUD removed