Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
40 lines (31 loc) · 1.46 KB

File metadata and controls

40 lines (31 loc) · 1.46 KB

Get Next Agent Information

Get information about the next available agent for an incoming conversation. This endpoint returns the available agents who have not been assigned to any chat yet.

HTTP MethodURLRequires Auth
GET/api/v1/livechat/agent.next/:tokenno

Path variables

KeyExample valueDescription
token *iNKE8a6k6cjbqWhWdThe visitor token.

{% hint style="info" %} To get the token value, call the Get Rooms endpoint to retrieve the details of all rooms. {% endhint %}

Example Call

{% code overflow="wrap" %}

curl --location 'http://localhost:3000/api/v1/livechat/agent.next/54fc5544030bcecda053311cb6b98920bdf953f242c129d7b8065000b1f9b2e9'

{% endcode %}

Example Response

{
  "agent": {
    "_id": "7Gm3PoFCJWTCJ68XR",
    "emails": [
      {
        "address": "agent@rocket.chat",
        "verified": true
      }
    ],
    "name": "Livechat Agent",
    "username": "livechat.agent"
  },
  "success": true
}