update_ad_build_spec
Replace the organization’s standing checks on how its ads are built.
Use it when the user states a rule every ad must follow (“lead ad sets always optimize for LEAD”, “landing URLs carry the location’s code”), never for a one-off edit. Every check appears in the Checks list on each draft and in its review; a failing check with severity error (the default) blocks review, and the checks frozen with a review are re-checked at publication. Checks never change a draft. rules = {“checks”: [{operation, when?: {field_path: regex}, when_row?: {column: regex}, field, required|equals|matches|contains|not_matches|not_contains|template, message, severity?}]} is the whole set: read it first and pass its version as expected_version; {} deletes it. operation and fields must exist in get_ad_creation_capabilities; field_path may be dotted (promoted_object.custom_event_type); required accepts alternatives (feed_video_id|feed_image_hash); when scopes a check by the step’s own fields (e.g. only ad sets whose name matches ”(?i)booking”); when_row scopes it by the draft’s recorded row (e.g. {“region”: “^EU$”}: only rows whose region is EU), and a draft with no row, or whose row lacks that column, is not held to it. A text list (bodies, titles) is read item by item: contains/matches pass when any item does, not_contains/not_matches fail when any item does (“no headline says cure”). An expected value may compare with the row a location draft was built from as {{row.<column>}} — the source_row or values recorded by create_ad_plan_variants. A draft whose row lacks that column or leaves it blank FAILS the check; a draft built from no row shows “cannot check”. The result lists unknown_row_columns: columns no table here has — usually a typo. Anything else in double braces (Meta’s {{ad.name}}, {{placement}}) is literal. rules may also carry name_templates: {ad?, creative?}, how ad plans built from a creative batch (batch_to_plan_group) name their ads and creatives, e.g. “{concept}{angle}{aspect}_{v}”. Tokens: {concept}, {creative_name}, {angle}, {hook}, {format_style}, {aspect}, {source}, {market}, {date} (YYYYMMDD), {v} (the plan’s number in its group) and {row.<column>}; a token a plan lacks renders empty. There is no {sku}: no catalog read yields one. An account’s template replaces the organization’s of the same kind. account_id adds a set for one account on top of the organization’s.
Parameters#
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
platform | string | yes | ||
rules | object | yes | ||
account_id | string | no | ||
expected_version | integer | no |
Generated by generate_mcp_docs from the server tool. Add to this page below this block; the block is rewritten on every run.