Skip to main content
POST

Overview

Creates or changes the caller’s personal context document called name. This is what an agent calls to remember something about you (the MCP update_context tool uses it). Every change keeps the previous text as a revision, which you can see and restore in Dashboard > Context. Organization context can’t be written here. Organization documents are edited by the organization’s owners and admins in the dashboard; /v1/organizations/{org_id}/context/documents answers 403 to any API key, an admin’s included. Auth: API key (danube-api-key header) or dashboard session (JWT). An agent writing on your behalf sends x-danube-via: agent so the revision is labeled as the agent’s; SDKs and scripts leave it off.

Body Parameters

string
required
Document name: 1 to 80 letters, digits, spaces, dots, dashes or underscores. .md is added when there is no extension.
string
required
Markdown. At most 32,000 characters per document. Content that contains a credential (an API key, token or private key) is refused with 400; store secrets as a credential instead.
string
default:"replace"
replace overwrites the document; append adds content as a new paragraph at the end
integer
The version you read. If the document changed since then, nothing is written and the answer is 409 with the current document in detail.current.

Response

The document after the write: id, name, content, version, position, updated_at, updated_via, updated_by, plus created (true when the document did not exist before).

Limits

  • 10 documents per layer; a new document past that answers 400.
  • 32,000 characters per document, after an append too.

Example