Trying to make sense of why the GET /api/v2/agents/states endpoint returns an empty array [] for a specific agent who is clearly logged in and available in the CXone dashboard. I am building a transcript correlation service that requires accurate agent state timestamps.
The request includes valid OAuth headers and the organizationId query parameter. The response status is 200 OK, but the body is strictly empty. I have verified the agent ID against the GET /api/v2/agents endpoint, which returns the agent profile correctly. The agent is not in a ‘wrap-up’ or ‘busy’ state; they are idle and ready to take calls.
Is there a specific permission scope missing from the OAuth token? I am using agents:read and agents:states:read. Or does this endpoint only return states for agents explicitly queried via the agentId filter, rather than all agents in the org? The documentation is vague on whether it supports listing all active agents without an ID filter.
GET https://{orgId}.api.mynice.com/api/v2/agents/states
Authorization: Bearer {token}
Any insights on why the state list is empty?