Edit a doc (members). Send the `version` from get_doc; change any fields in one call. Close a handoff with `status: closed`.
update_docEdit a doc (members). Send the version from get_doc; change any fields in one call. Close a handoff with status: closed.
Call get_doc first and pass its version. body is the COMPLETE new markdown (not a diff or an appended piece): take the current body from get_doc, change it and send all of it. Change any fields (title, body, and for handoffs to, issues, status) in ONE call — one call makes one new version. Keep working notes current: when you learn something the next person (or agent) needs — progress, decisions, rules, gotchas — add it to the notes; this is optional, use your judgement. Handoffs: status: closed closes one (or open reopens it); to say you have read one use acknowledge_handoff instead. One doc is at most 1 MB (413 doc_too_large). Say in message what changed. The company brief is read-only here. Optional colour (D137, use sparingly; markdown stays the main format): <mark>text</mark> highlights (yellow; or <mark data-color="green">), <span data-color="red">text</span> colours text; colours yellow, green, red, blue, purple (e.g. green = passed / expected, red = bug / actual, purple = question); any other HTML is shown as plain text; keep the open and close tag in the same paragraph.
WRITE: version must be the version from your latest read of this file (get_issue for issues, list_comments for comments, list_sprints for sprints, get_doc for project docs, read_file for md files). If the file changed since, the call fails with 409 version_conflict and the error contains the current file (details.current, details.current_version): re-read it, re-apply your change on top of the current content and retry with the new version. Never overwrite someone else's change blindly — if your change and theirs disagree, ask the user which to keep.
You act with exactly the rights of the user who owns this token; a project you cannot see returns not_found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Handoffs only. | |
| body | No | The complete new markdown body. | |
| kind | Yes | Project docs (spec D76): `brief` = why the project exists, goals, business and tech structure; `notes` = working notes / progress; `handoffs` = hand-over to teams or the whole project; `company_brief` = the company's rules and guidelines (read-only in project routes). | |
| slug | Yes | File name of a doc without `.md`: lowercase a–z 0–9 and `-` (brief, notes, company brief) or `H-{n}` (handoffs). | |
| title | No | ||
| issues | No | Handoffs only. | |
| status | No | Handoffs only: close it, or reopen it. Acknowledge with acknowledge_handoff. | |
| message | No | What changed, shown in the doc history. | |
| version | Yes | Optimistic-lock version of the file; +1 on every write. Every write must send the version it read. | |
| project_key | Yes | Project key, e.g. `KJ`. 2–10 chars, uppercase letters and digits, starts with a letter. |