Create automated budget and pause rules with the Meta Marketing API Ads Rules Engine

domain: developers.facebook.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate with a Marketing API access token that has ads_management permission on the ad account.
  2. POST to /act_<AD_ACCOUNT_ID>/adrules_library with name, evaluation_spec, and execution_spec to define the rule.
  3. Choose a trigger-based rule (evaluated instantly as ad metadata/insights change) or a schedule-based rule (evaluated on a fixed interval) in the evaluation spec.
  4. Define the execution_spec action to apply to matching objects, such as pausing an ad set or adjusting budget.
  5. Set status to ENABLED to activate the rule or DISABLED to pause it without deleting it.
  6. Verify the exact evaluation_type/execution_type enum values against the current ad-rule reference before hardcoding them, since this endpoint follows the same versioned deprecation cycle as the rest of the Marketing API.

Known gotchas

Related routes

Create an automated Ad Rule via the Meta Marketing API's Ad Rules Engine to pause campaigns or adjust budget on performance triggers
developers.facebook.com · 5 steps · unrated
Create and bind a TikTok Ads Automated Rule via the Optimizer Rule API
business-api.tiktok.com · 5 steps · unrated
Create a Google Ads campaign via the API (budget, campaign, ad group)
developers.google.com/google-ads/api · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans