---
title: "List Trashed Agents"
method: GET
path: "/api/agents/trash"
tags: ["agents"]
---

# List Trashed Agents

`GET /api/agents/trash`

## 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/trash`
- Auth: none declared

List the caller's recycle-binned agents (TOS-397).

Declared before ``GET /{agent_id}`` so the literal ``trash`` segment isn't
captured as an agent id.

TOS-3512 follow-up: trimmed to ``AgentSummaryResponse`` like the other two
list endpoints. AgentsPage.tsx renders trashed agents through the same
``AgentCard`` as the live list, reading ``knowledge_source_count`` rather
than the full ``config`` this shape omits.

TOS-3663 follow-up: routed through ``_agent_list_payloads`` like every
other list. ``list_deleted_agents_for`` is scoped to agents the caller
administers, so in practice every row here is an owner row and nothing is
stripped - but that is a property of today's query, not of this endpoint,
and pinning the serializer is what keeps it true if the scope ever widens.
The move also removes a real N+1: this endpoint passed no ``tags``, so
``_agent_to_response`` fired one ``agent_tags`` query per trashed agent.

## Headers

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

## Response `200`

Successful Response

- unknown

## 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)
