---
title: "Get Capability Document"
method: GET
path: "/core/agents/{agent_id}/capability-document"
tags: ["capability_documents"]
---

# Get Capability Document

`GET /core/agents/{agent_id}/capability-document`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/core/agents/{agent_id}/capability-document`
- Auth: HTTP bearer

The agent's document for the builder panel and the in-app viewer.

Carries the check failures and the residue: the caller is an authenticated operator,
and what a run could not corroborate is what makes a generated document reviewable.

## Path parameters

- `agent_id` string, required

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Response `200`

Successful Response

- CapabilityDocument: One agent's capability document. ``content`` is null until a generation has succeeded, and a later failure leaves the last good content in place — so a row with ``status == "failed"`` and content present is a published document whose refresh failed, not a broken one.
  - `id` string, required
  - `organization_id` string, required
  - `agent_id` string, required
  - `source_config_version` integer, nullable
  - `status` 'pending' | 'running' | 'ready' | 'quality_failed' | 'failed' | 'ineligible', required
  - `workflow_id` string, nullable
  - `content` object, nullable
  - `is_public` boolean
  - `check_failures` object[]
  - `residue` string[]
  - `generated_by` string, nullable
  - `error` string, nullable
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time, nullable
  - `stale` boolean

## Other responses

- `422`: Validation Error

---

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