apply_document_update
Save a change shown with preview_document_update, after the user agreed to it, or publish the document as previewed (publish=). Replaces or removes the stored section or block, or replaces chart data or the Visual Story; the previous document stays in its version history in Clarifo (the previous Visual Story in the item, one step back).
Pass exactly the arguments of the preview plus its base_version and preview_hash. If the document changed since the preview the call is refused (version_conflict): read it and preview again.
Args: item_id: As in the preview. base_version: base_version from the preview. preview_hash: preview_hash from the preview. idempotency_key: Optional; leave it out. Clarifo recognises a repeated identical request by its content. Give one only to retry this same request. section_id: As in the preview. markdown: As in the preview. operation: As in the preview. sources: As in the preview. companies: As in the preview. workspace_id: Optional; the document's workspace. block_id: As in the preview. visual_id: As in the preview. visual_data: As in the preview. visual_story: As in the preview. publish: As in the preview: "public" or "private". Publishes through Clarifo's own Publish (plan rules, content review); tell the user the public_url.
Returns: {"status": "document_updated", "content_version", "editor_url"} or {"status": "document_published", "public_url", "visibility"} or {"error", "failure_kind"}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"item_id": "<item_id>",
"base_version": "<base_version>",
"preview_hash": "<preview_hash>"
},
"name": "apply_document_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seo | No | ||
| item_id | Yes | ||
| publish | No | ||
| sources | No | ||
| block_id | No | ||
| markdown | No | ||
| companies | No | ||
| operation | No | replace | |
| visual_id | No | ||
| section_id | No | ||
| visual_data | No | ||
| base_version | Yes | ||
| preview_hash | Yes | ||
| visual_story | No | ||
| workspace_id | No | ||
| idempotency_key | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||