---
title: "Put Control Document"
method: PUT
path: "/api/domains/{domain_id}/agent-desk/control-documents/{kind}"
tags: ["agent_desk"]
---

# Put Control Document

`PUT /api/domains/{domain_id}/agent-desk/control-documents/{kind}`

## Request

- Base URL: `https://api-v1.unusual.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-v1.unusual.ai/api/domains/{domain_id}/agent-desk/control-documents/{kind}`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/login`

Save-and-activate a manual edit: appends a new version (source
"manual") and makes it the active one. This is the point where the
control-document surface goes live for a domain — until the first PUT,
desk prompts are byte-identical to today's.

## Path parameters

- `kind` 'knowledge' | 'policy', required
- `domain_id` string, required

## Headers

- `x-view-as` string, nullable

## Request body

- ControlDocumentUpdate
  - `markdown` string, required
  - `change_summary` string, nullable

## Response `200`

Successful Response

- ControlDocumentOut
  - `kind` string, required
  - `active_version_number` integer, nullable
  - `active_markdown` string, nullable
  - `version_count` integer
  - `updated_at` string, nullable
  - `char_budget` integer, nullable
  - `compiling_since` string, nullable
  - `human_edited` boolean
  - `proposed_version_count` integer
  - `latest_proposed_version_number` integer, nullable
  - `serving` boolean
  - `always_on` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/unusual/apis/dashboard-server.md) - [All operations](https://skmtc.dev/unusual/apis/dashboard-server/llms.txt) - [OpenAPI document](https://skmtc.dev/unusual/apis/dashboard-server/revisions/89f716930ead?raw)
