CXone GET /agents/states returns empty array for active agent

Hitting the CXone endpoint GET /api/v2/agents/states but getting an empty [] in the response body. The agent is definitely logged in and active on the console. Auth token is valid, refreshed just seconds ago. Tried passing the agentId query param too, same result.

const response = await fetch(`${baseUrl}/api/v2/agents/states?agentId=${agentId}`, {
 headers: {
 'Authorization': `Bearer ${token}`,
 'Content-Type': 'application/json'
 }
});
console.log(await response.json()); // outputs []

Checked the headers, no errors. Status 200. Is there a delay in state propagation or a specific filter I’m missing? The UI shows the agent status as Ready but the API sees nothing.

That endpoint only returns states if the agent has explicitly changed their status or availability. Logged-in but idle agents often return empty arrays. Check the agent’s current available status in the UI. If you need real-time presence, query /api/v2/users/{userId}/presence/status instead. The agent states endpoint is more about manual status changes than raw login state.