Agent Management – Log in to or Log out of Queues

Log in or log out the specified dynamic agent from one or more queues.

Request URL

GET {base_url}/{api_path}/agent/login?access_token={access_token}

Request parameters

Parameter Required Type Description
ext_id Yes Integer The extension ID of the dynamic agent.
Note: You can query agent's extension ID using Search Specific Extensions.
queue_ids No String
Important: If this parameter is not included, the system will log the agent in or out of all queues.
The unique ID(s) of the queue(s) that the agent needs to log in or log out of.
Note:
  • Use a comma to separate multiple queue IDs.
operation Yes String Log in to or log out the dynamic agent from the specified queue(s).
Valid value:
  • login: Log the agent in to the queue(s).
  • logout: Log the agent out of the queue(s).
is_paused No Integer Whether to pause service for the dynamic agent after logging him or her to the queue.
Valid value:
  • 0: Do NOT pause service for the agent after logging him or her to the queue(s).
  • 1: Pause service for the agent after logging him or her to the queue(s).
Note: If you don't configure this parameter, it will be filled with the default value 0.
reason No String Feature code for the pause reason.
Valid value: The feature code for the existing pause reasons on PBX.
Note:
  • If the PBX plan subscription is NOT Enterprise Plan or Ultimate Plan, do NOT pass this parameter, otherwise the request will fail.
  • You can query the feature code for the existing pause reasons using Query Queue Pause Reason List.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

Examples

Request example

Log in the dynamic agent (Extension ID: 85) to all his or her assigned queues, and pause service for the agent after login.

GET /openapi/v1.0/agent/login?access_token=u6UfsayUeBpUrwwpaBs6hkDeCzEE6D6t&ext_id=85&operation=login&is_paused=1 HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com
Response example
HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS"
}