Create an automated Ad Rule via the Meta Marketing API's Ad Rules Engine to pause campaigns or adjust budget on performance triggers

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

Steps

  1. POST to /act_{ad_account_id}/adrules_library with evaluation_type (SCHEDULE or TRIGGER) and one or more filters (field/operator/value) scoping which campaigns, ad sets, or ads the rule applies to.
  2. Define execution_spec.execution_type as one of PAUSE, CHANGE_BUDGET, CHANGE_BID, CHANGE_CAMPAIGN_BUDGET, NOTIFICATION, UNPAUSE, or another supported action, plus execution_options for the action's parameters.
  3. For SCHEDULE-based rules, set schedule_spec.schedule_type (DAILY, HOURLY, SEMI_HOURLY, or CUSTOM) and the days/start_minute/end_minute evaluation windows.
  4. Submit with a name for the rule; the response returns the new AdRule's id via read-after-write.
  5. Update an existing rule with POST /{ad_rule_id}, or retrieve its run history via the /{ad_rule_id}/history edge to audit past executions.

Known gotchas

Related routes

Create automated budget and pause rules with the Meta Marketing API Ads Rules Engine
developers.facebook.com · 6 steps · unrated
Create a Google Ads campaign via the API (budget, campaign, ad group)
developers.google.com/google-ads/api · 6 steps · unrated
Create a campaign via Meta Marketing API
developers.facebook.com/docs/marketing-apis · 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