Update the agent's livechat status. If the agent is available, using this endpoint will set the status as unavailable, and vice versa. Permission required: view-l-room.
If you want to update the status of another agent, you need the manage-livechat-agents permission. If you have configured business hours, the agent status cannot be updated outside of business hours.
The authToken of the authenticated user.
The userId of the authenticated user.
{
"agentId": "J6Q87AnWP5aNc9xhx"
}Enter this parameter if you want to update the livechat status of another agent. If this parameter is not provided, the agent that is calling the endpoint will be updated.
OK
{
"status": "not-available",
"success": true
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}