Update user
Update a complete user record by its user ID.
| Method | PUT
|
| URL | v1/user/{siteId}/{userId}
|
Note: You cannot use this endpoint to update a user's username.
Generate the request payload for this API call
-
Call the
GETendpoint with theuserIdof the user to update. -
Modify the writable User model parameters (except
usernameandpassword) in thisGETendpoint’s response object, as needed. This is described in Get user. -
Use the modified response as the value for
changedRecordin the request payload for the Update API call.
Request parameters
|
Parameter |
Type |
Description |
Required |
|---|---|---|---|
|
(body) |
UserWithChangeReason |
Body containing change reason and updated user data.
|
yes |
|
(path) |
integer |
Site ID. Unique identifier assigned during client-account creation in Nuance Portal. |
yes |
|
(path) |
integer |
User ID. |
yes |
UserWithChangeReason model
|
Parameter |
Type |
Description |
Required |
|---|---|---|---|
|
|
User |
Writable properties of the User model. |
yes |
|
|
string |
Reason of changes. Maximum length: 512 characters. |
yes |
Response codes
|
Status |
Content |
|---|---|
|
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.
url / portal/configuration/api/v1/user/123/12345678
body { "changedRecord": {"id": 12345678,
"username": "JonDoe",
"firstname": "Jon",
"lastname": "Doe Version2",
"allAccess": false,
"failedAttempts": 0,
"locked": false,
"language": "en",
"expiredDate": -57600000,
"defaultSiteId": 123,
"numPswdHistory": 5,
"pswdDate": 0,
"ssoUser": false,
"allAgentGroup": false,
"allBusinessUnit": false,
"organizationId": 0,
"roleIds": [
17,
19
],
"roles": [
{"id": 17,
"name": "ROLE_SAAS_CLIENT_ADMINISTRATOR",
"additive": 0,
"applications": [
1
],
"readOnly": false
},
{"id": 19,
"name": "ROLE_SAAS_CLIENT_AGENT",
"additive": 0,
"applications": [
1
],
"readOnly": false
}
],
"siteIds": [
123
],
"sites": [
{"id": 123,
"name": "SiteName",
"agentGroupsActive": true,
"enableAgentCoach": false,
"applications": [
1
]
}
],
"businessUnitIds": [
87654321
],
"businessUnits": [
{"id": 87654321,
"siteId": 123,
"name": "BusinessUnit1"
}
],
"agentGroupIds": [
10004321
],
"agentGroups": [
{"id": 10004321,
"siteId": 123,
"name": "AgentGroup1",
"enableAgentCoach": false,
"userEnableAgentCoach": false
}
],
"skillIds": [
1234
],
"skills": [
{"id": 1234,
"siteId": 123,
"name": "AgentLocation",
"value": "USA",
"nonReportable": false,
"required": false,
"exclusive": false
}
],
"disabled": false,
"tempLocked": false,
"activated": true,
"programRulesAccess": false,
"syncAdmin": false,
"version": 0
},
"reason": "Sample Update operation"
}
Status code is 204. Returns no content in the response.
{"error": "HTTP 404 Not Found",
"code": 404
}