This API lets you directly control the agent states (applicable for offline agents only) within the account through your CRM system.
Note:
Make sure the admin setting 'API Authentication' is set to 'BASIC_AUTH', If you are using this API.
Header parameters
Parameter | Description |
---|---|
apiKey* | Your CloudAgent account API Key |
Content-Type | application/json |
Body Params
{
"userName":"xxxxx",
"phoneName":"xxxx",
"state":"Pause / Ready",
"agentId":"xxxx",
"pauseReason":"xxxxx"
}
Parameter | Description |
---|---|
userName* | Your CloudAgent account username |
state* | Mention the agent state change - 'Ready', 'Pause' |
agentId* | The unique ID assigned to an agent |
pauseReason | The reason provided if the state is 'Pause' |
Note
- Parameters with ‘*’ are considered to be mandatory parameters.
- This API is applicable only in case of offline agents
Possible responses
Invalid apiKey | "status": "error" |
Empty apiKey | "status": "error" |
Invalid userName | "status": "error" |
Empty userName | "status": "error" |
Invalid state | "status": "error" |
Passing Invalid pauseReason Value. When the user passes State as Pause. | "status":"error", |
Changing the agent to 'Pause' / 'Ready" state when he is not logged in. | "status":"error", |
Changing the agent to Pause state when he is in ACW state. | "status":"error", |
Changing the agent to Pause state when he is in BUSY state. | "status":"error", |
Success response | "status": "success" |