---
title: "Get Pending Change Counts"
method: GET
path: "/api/agents/pending-change-counts"
tags: ["agents"]
---

# Get Pending Change Counts

`GET /api/agents/pending-change-counts`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/agents/pending-change-counts`
- Auth: none declared

Per-agent pending change-set counts for the caller's owned agents.

TOS-2165: powers the "needs review" badge on the Agents list. Declared
BEFORE the plain ``GET /{agent_id}`` route so the literal path is not
captured by the ``{agent_id}`` UUID parameter (TOS-3272: a prior version
of this comment only guarded against ``/{agent_id}/pending-changes``,
missing this route's real collision).

## Headers

- `x-impersonate-identity-id` string, nullable

## Response `200`

Successful Response

- PendingChangeCountsResponse: TOS-2165: change-set counts keyed by agent identity id, plus the sum. Agents with nothing pending are absent from ``counts`` rather than present with 0, so the client can treat presence as "has work".
  - `counts` object, required
  - `total` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/ce2c2ce318b1?raw)
