blocks/update-acf-block-data patches the field values of one ACF block already sitting in a post, addressed by its position in the block tree.
It merges by default: the fields you name change, the ones you do not keep their values. Pass replace: true when you genuinely want to overwrite the whole payload.
At a glance
| Ability | blocks/update-acf-block-data |
| Toolset | Advanced Custom Fields — toolset/acf |
| Group | ACF Blocks |
| Requires | Advanced Custom Fields Pro |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
Blocks are addressed by path — an array of 0-based indexes walking down the tree. [2] is the third top-level block; [1, 0] is the first block nested inside the second. Get the path from blocks/outline-post-blocks, which stays cheap even on a long post.
A path that does not point at an ACF block is refused, with the error naming blocks/update-post-block for ordinary ones. That refusal is deliberate: writing an ACF payload onto a core block would produce markup neither one can read.
Merging is what makes the call idempotent. Sending the same patch twice leaves the same state, so a retry is safe.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
post_id | integer | Yes | The post holding the block. |
path | array of integers | Yes | Block path as reported by blocks/outline-post-blocks, e.g. [2] or [1, 0]. |
data | object | Yes | Field name => new value. |
replace | boolean | No | Replace the whole data payload rather than merging into it. Defaults to false. |
apply_wp_slash | boolean | No — defaults to true | Runs wp_slash() over your strings before writing, so literal backslashes survive. Set it false only when you have already slashed the payload yourself. |
What comes back
| Name | Type | What it is |
|---|---|---|
post_id | integer | The post that was written. |
data | object | The block’s data payload after the write. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Update the quote on the testimonial block that’s third from the top of post 412.
It resolves to one call:
{
"ability": "blocks/update-acf-block-data",
"parameters": {
"post_id": 412,
"path": [2],
"data": {
"quote": "We shipped in a week instead of a quarter — twice."
}
}
}Worth knowing
- Find the path first. Guessing at an index edits the wrong block, and the call cannot tell the difference.
replace: trueclears every field you do not name. Use it when you want a known state, not as a default.- Requires ACF Pro.
Related abilities
- Get ACF Block Fields — confirm the field names before patching
- Insert ACF Block — add a new instance instead
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category