Update Agents

Updates an agent’s information.

Permissions

  ----
  Permissions:INTEGRATOR,SUPERVISOR
  ----
PathDescription
userVariableNamePossible values: id/login – agent variable

Request Body Parameters

ParameterTypeDescription
loginstring (required)Agent’s login
passwordstring (required)Agent’s password
namestring (required)Agent’s name that will be visible to clients
aliasstring (optional)Agent’s alias
genderstring (enum)Agent’s gender – MALE or FEMALE
supervisorstring (optional)Login of the supervisor to whose group the agent belongs. You need this parameter to assign the agent to the supervisor’s group.
rolestring (required)OPERATOR (only the OPERATOR role is supported)
skillsarray of long (optional)Agent’s skills
emailstring (optional)Agent’s email address
photoUrlstring (optional)Link to the agent’s photo
settingsarray 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