Skip to navigation

Replace a document's body

View as Markdown

Replace a document’s markdown body. To change only a part of the body, use edit_doc. Basement records a new version that you can restore. Read the document first with read_doc. You cannot change agent-memory documents (isAgentMemory in list_docs). Requires write access.

Authentication

AuthorizationBearer

A Basement key (bsmt_...), from Agents, Connect in the app.

Request

This endpoint expects an object.
docIdstringRequired

The document ID from list_docs

bodyMarkdownstringRequired
The full new markdown body
changeSummarystringRequired
One line on what changed and why

Response

The tool's answer.
oktrue
noopboolean
true when the text was already the same
versionCountinteger
The document's new version

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error