List Online Agents
GET/accounts/:account_id/agents/online
Returns the IDs of agents who are currently online in the account.
Optionally filters to the members of one team. Useful for bots that decide whether to hand a conversation over to a human.
| Setting | Value |
|---|---|
| Method | GET |
| Path | /api/v1/accounts/{account_id}/agents/online |
| Authorization | User token (any agent) or agent-bot token. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id | integer | Yes | Account ID. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
team_id | integer | No | Return only online agents who are members of this team. 404 if the team does not exist. |
Example: all online agents
curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/agents/online' \
-H 'api_access_token: <YOUR_API_ACCESS_TOKEN>'
Response (200 OK). The IDs are strings.
["51", "52", "53"]
Example: online agents of a team
curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/agents/online?team_id=7' \
-H 'api_access_token: <YOUR_API_ACCESS_TOKEN>'
Response (200 OK):
["51"]
Request
Responses
- 200
- 401
- 404
The user IDs of the online agents, as strings.
The access token is missing or wrong, or its user does not belong to this account.
The team in team_id does not exist in this account.