# PUT /api/context-docs

PUT /api/context-docs

Canonical URL: https://opennodeflow.dev/wiki/api-put-api-context-docs/
JSON reference: https://opennodeflow.dev/wiki/api-put-api-context-docs/index.json
Source snapshot: 2026-10-23

PUT /api/context-docs



```http
PUT /api/context-docs
```


## Contract

`{target,markdown,expectedRevision}`. Exact compare-and-swap; a stale write returns 409 plus the current record and preserves the editor's draft. Empty Markdown clears content while advancing the revision.

## Request



```json
{
  "path": [],
  "query": [],
  "body": []
}
```



## Response



```json
{
  "statuses": [
    409
  ],
  "fields": [
    "current",
    "error"
  ]
}
```



## Guard

Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply.

## Use this endpoint

The base URL is your own ONF host, for example `http://localhost:4310`. Read [HTTP API usage](/wiki/http-api/) for request bodies, revision guards, accepted-run behavior and errors.

A source-registered route is not a promise that every real provider or every input combination has been tested. Use [agent safety](/wiki/agent-safety/) when an operation can run code or change external systems.

---

## Documentation provenance

- `server/context-docs.ts`

This page describes maintained source, not a live inventory or an authorization to perform actions.
