Jump to: navigation, search

Update User

This operation is part of the Users API section of the Web Services API.

Overview

Updates a user in the contact center (requires an administrator role).

Request URL /api/v2/users/{userid}
HTTP Method PUT
Required Features api-provisioning-write

Samples

Request

PUT http://localhost:8080/api/v2/users/<userId>
{
  "firstName":"Some first name"
}

HTTP Response

{
  "statusCode": 0
}
Important
Changing the userName is not allowed.

Request

PUT http://localhost:8080/api/v2/users/<userId>
{
  "userName":"Operation forbidden is expected"
}

HTTP Response

400 FORBIDDEN

{
  "statusCode": "3",
  "statusMessage": "This operation is not allowed: 'userName' is a read-only property"
}
Important
Administrators cannot remove the admin role from themselves.

Request

PUT http://localhost:8080/api/v2/users/<adminUserId>
{
  "roles":["ROLE_AGENT"]
}

HTTP Response

400 FORBIDDEN

{
  "statusCode": "2",
  "statusMessage": "You cannot remove role 'ROLE_ADMIN' from yourself."
}
This page was last edited on October 31, 2023, at 13:32.
Comments or questions about this documentation? Contact us for support!