post
https://{domainname}/ca_apis/changeAgentState
Change the state of an agent.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
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.
APIs Domain NameFor domestic ccaas - enter the domain: in1-ccaas-api.ozonetel.com
For international ccaas - enter the domain: api.ccaas.ozonetel.com
For Partners - enter the respective URL
Header parameters
| Parameter | Description |
|---|---|
| apiKey* | Your CloudAgent account API Key |
| Content-Type | application/json |
Body Params
| Parameter | Description |
|---|---|
| userName* | Your CloudAgent account username |
| phoneName | Phone name of the agent configured in the CloudAgent account. |
| 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" "message": "userName or apiKey is Invalid" |
| Empty apiKey | "status": "error" "message": "apiKey should not be empty" |
| Invalid userName | "status": "error" "message": "user_name or api_Key is Invalid" |
| Empty userName | "status": "error" "message": "Please provide UserName" |
| Invalid state | "status": "error" "message": "The state should be either 'Ready' or 'Pause' state'" |
| Passing Invalid pauseReason Value. When the user passes State as Pause. | "status":"error", "message":"pauseReason is Invalid" |
| Changing the agent to 'Pause' / 'Ready" state when he is not logged in. | "status":"error", "message":"Agent is not Logged In" |
| Changing the agent to Pause state when he is in ACW state. | "status":"error", "Message":"Agent xxxx is in ACW state. You cant change to Pause state" |
| Changing the agent to Pause state when he is in BUSY state. | "status":"error", "Message":"Agent xxxx is in BUSY state. You cant change to Pause state" |
| Success response | "status": "success" "message": " {"type":"response", "utid":"22", "resp":"Success:tbAgentPause~INBOUND", "agentStatus":"PAUSED", "agentId":"XXXXX", "user":"XXXXX"}" |
