Patch user

Partly update a user record, identified by its user ID, by a specified property value or attribute.

Method PATCH
URL /v1/user/{siteId}/{userId}

How this endpoint works

Property value validations

  • If a property’s value is set to:

    • null, then the field's value in the database is deleted

      • null or [] (empty array) for properties that accept arrays

      • null or {} (empty object) for properties that accept objects

      • null for everything else

    • nothing (value is not sent), then the value in the database is not unchanged

    • some value, then the value in the database is replaced for that property (subject to validations)

agentAttributes parameter validations

  • If the agentAttributes parameter contains a non-existent AgentAttributeId, then the 422 status code is returned.

  • If the agentAttributes parameter contains an AgentAttributeId that the site cannot access, then the 422 status code is returned.

Notes:  
  • Agent attributes, which are the keys within the agentAttributes parameter, are case sensitive.

  • There is no validation to check if the AgentAttributeIds provided in the AgentAttributeName property's values correspond to each other.

Request parameters

Parameter

Type

Description

Required

body (body)

JSONWithChangeReason

Body containing the change reason and the user properties to update in a JSON format.

yes

siteId (path)

integer

Site ID. Unique identifier assigned during client-account creation in Nuance Portal.

yes

userId (path)

integer

User ID.

yes

JSONWithChangeReason model

Parameter

Type

Description

Required

changedRecord

JSON

Most of the writable properties of the User model. The ones that are guaranteed to be supported are specified in "User patch properties," below.

yes

reason

string

Reason of changes.

Maximum length: 512 characters.

yes

User patch properties

Parameter

Type

Description

Required

firstname

string

User's first name.

Maximum length: 50 characters.

no

lastname

string

User's last name.

Maximum length: 50 characters.

no

password

String

User password, as described in the UserPassword model.

  • Cannot be one of the 5 previous passwords.

  • Cannot contain common dictionary words of at least 4 characters.

  • Must be at least 12 characters long and contain at least:

    • 1 special character

    • 1 uppercase character

    • 1 lowercase character

    • 1 number

no

siteIds

array

Site IDs (described above) of sites that the user can access.

no

agentGroupIds

array

IDs of agent groups to which the user is assigned.

no

businessUnitIds

array

IDs of business units to which the user is assigned.

no

roleIds

array

Role IDs to which the user is assigned.

no

agentSetting

UserAgentSetting model

Contains the following properties:

  • AgentAlias: Agent alias.

  • MaxChats: Maximum number of chats that an agent can have at the same time.

  • MaxForced: Maximum number of chats, including forced chats, that an agent can have at the same time.

Note: Forced chats are the total number of chats an agent can have including additional chats above the MaxChats value. This value must be equal to or greater than the MaxChats value, described above.

no

agentAttributes

JSON object

Contains the AgentAttributeIds as arrays for each AgentAttributeName.

no

Response codes

Status

Description

204

Request succeeded, and there is no content to send in the response.

400

Bad request. The server cannot process the request due to a client error.

404

The server cannot find the requested user. This user may not exist.

422

The request was well-formed, but there were validation errors, so it could not be followed.

For a full list of supported response codes for UMAPI, see Response codes.

Samples

Note: Authentication is required to try out samples. For details, see API token authentication.