Updates an agent’s information.
Permissions
---- Permissions:INTEGRATOR,SUPERVISOR ----
| Path | Description | 
| userVariableName | Possible values: id/login– agent variable | 
Request Body Parameters
| Parameter | Type | Description | 
| login | string (required) | Agent’s login | 
| password | string (required) | Agent’s password | 
| name | string (required) | Agent’s name that will be visible to clients | 
| alias | string (optional) | Agent’s alias | 
| gender | string (enum) | Agent’s gender – MALEorFEMALE | 
| supervisor | string (optional) | Login of the supervisor to whose group the agent belongs. You need this parameter to assign the agent to the supervisor’s group. | 
| role | string (required) | OPERATOR (only theOPERATORrole is supported) | 
| skills | array of long (optional) | Agent’s skills | 
| email | string (optional) | Agent’s email address | 
| photoUrl | string (optional) | Link to the agent’s photo | 
| settings | array of objects (optional) | Agent’s settings | 
Curl Example
$ curl 'http: //localhost:8080/api/v1/agents/1?userVariableName=id' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer <integrator_token>' \
    -d '{
  "login": "login",
  "password": "password",
  "name": "name",
  "alias": "alias",
  "gender": "MALE",
  "role": "OPERATOR",
  "skills": [
      2,
      3,
      5
  ],
  "photoUrl": "photo url",
  "email": "email",
  "settings": [],
  "supervisor": "supervisor1"
}'
HTTP Request
PUT /api/v1/agents/1?userVariableName=id HTTP/1.1
Content-Type: application/json
Authorization: Bearer <integrator_token>
Content-Length: 240
Host: localhost: 8080
{
    "login": "login",
    "password": "password",
    "name": "name",
    "alias": "alias",
    "gender": "MALE",
    "role": "OPERATOR",
    "skills": [
        2,
        3,
        5
    ],
    "photoUrl": "photo url",
    "email": "email",
    "settings": [],
    "supervisor": "supervisor1"
}
Example of a Successful HTTP Response
HTTP/1.1 200 OK Vary: Origin Vary: Access-Control-Request-Method Vary: Access-Control-Request-Headers