Apply page operations
apply_page_operationsApply up to 50 page edits to a board's published page in order and ATOMICALLY — the first failure rolls everything back, and the error carries operation_index naming the failing operation. Each operation is { type: add|update|move|delete|reorder, ...} with exactly the arguments of the matching single tool (add_page_element etc., minus organization/token/subboard_token/expected_version_token, which are batch-level); operations in get_page_elements_catalog is the authoritative argument map, and unknown keys are refused. Ids the server mints inside a batch cannot be addressed by later operations of the same batch, so give every new element (and a new section's columns) your own id. Returns the whole document (slots) and one summary per operation. Top-level converged appears only when EVERY operation converged, and never on a batch containing an update. One batch edits one document: the main page, or one nested board's section. Requires modify on the board and page-layout API writes enabled for the workspace — otherwise 403 page_layout_api_disabled, which only Playbook can turn on; retrying does not help. Concurrency: pass the version_token from get_page_layout as expected_version_token; if the page changed since, the call answers 409 stale_document and applies NOTHING — read again, re-decide, re-send. A successful write that sent a token returns the NEW version_token: send that on your next write, because your own write already made the old one stale. Of the 409s only lock_wait_timeout and page_layout_library_locked are safe to repeat unchanged. converged: true in the response means nothing changed (the goal state already held); materialized: true means the page had no stored document and this call saved the template's defaults. Both keys are ABSENT when false. The public page can keep showing the old version for up to an hour after a successful write, so a reload may not show the change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Board token of the published board | |
| operations | Yes | The edits, e.g. { type: 'delete', slot_id: 'grid', element_id: '<id from get_page_layout>' }. | |
| organization | No | Workspace slug, as returned by list_organizations. Omit it when the account has a single workspace — it is then resolved from your token. Pass it only when the account has several, or when you mean a workspace other than the obvious one. | |
| subboard_token | No | Edit a nested board's section of this page instead of the page itself: the `collectionToken` of an entry in get_page_layout's `subboards_settings`. Omit for the main page. | |
| expected_version_token | No | The `version_token` from get_page_layout, echoed verbatim to make this write a compare-and-swap. Omit to write unconditionally. |