---
title: "Set Capability Document Visibility"
method: PATCH
path: "/core/agents/{agent_id}/capability-document/visibility"
tags: ["capability_documents"]
---

# Set Capability Document Visibility

`PATCH /core/agents/{agent_id}/capability-document/visibility`

## 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/visibility`
- Auth: HTTP bearer

Turn the shared link on or off.

Revocation is immediate: the public reader checks the flag on every request, so a link
already in the wild stops resolving without anything having to be re-minted.

## Path parameters

- `agent_id` string, required

## Headers

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

## Request body

- VisibilityRequest: Flip the kill switch on a link that may already be in the wild.
  - `is_public` boolean, required

## Response `200`

Successful Response

- ShareResponse: The shareable link for a document, minted for an already-authorised caller.
  - `url` string, required
  - `is_public` boolean, required

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