Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview
On this page

meta_update_budget

Change a Meta campaign or ad set's daily or lifetime budget, with a safety cap and a level guardrail.

Changes the daily or lifetime budget of a live Meta campaign or ad set. Requires the mutation:write scope, and the ad account must be connected to your organization with write access.

Budgets are in whole units of the account currency — euros, not cents. 10.5 is €10.50, the unit list_entities answers a budget in. Meta refuses more decimals than the currency has, and it counts some currencies, such as JPY and HUF, with none.

Input

Field Type Required Description
advertiserId acc_${string} yes The ad account. Must belong to your organization.
id string yes The Meta object ID of the campaign or ad set.
level 'campaign' | 'adset' yes Which level id refers to. Not available on ads.
dailyBudget number no New daily budget, whole units. Provide this or lifetimeBudget.
lifetimeBudget number no New lifetime budget, whole units. Provide this or dailyBudget.

Exactly one of dailyBudget / lifetimeBudget must be given. Passing both, or neither, is rejected.

Guardrails

Two checks apply before anything is sent to Meta. Both live in the shared mutation layer, so every caller is held to them:

  • Safety cap. A budget above €1,000,000 or $1,000,000 is refused with the amount named. The cap counts the unit Meta counts, so it is ¥100,000,000 in yen.
  • Level check. A live read decides where the budget actually lives — on the campaign under Advantage campaign budget, on the ad set otherwise — and a change aimed at the wrong level is refused by name rather than silently ignored.

Output

Returns immediately, before the change has been applied:

{ "workflowId": "…" }

Poll get_mutation_status with that workflowId to find out whether it succeeded.

Example

“Raise the Prospecting campaign’s daily budget to €150.”

const { workflowId } = meta_update_budget({
  advertiserId: 'acc_123456789',
  id: '23851234567890123',
  level: 'campaign',
  dailyBudget: 150, // €150.00
});

get_mutation_status({ workflowId });
// → { status: 'complete', result: { ok: true, … } }

Errors

  • Provide exactly one of dailyBudget or lifetimeBudget — both or neither were given. Rejected before any workflow starts.
  • budget_cap_exceeded — above the safety cap. The message names the amount and the cap.
  • wrong_level — the campaign uses Advantage campaign budget and you aimed at the ad set, or the reverse. The message says which level to use.
  • Advertiser not found for this organization — the account isn’t yours, or doesn’t exist.
  • Connected without write access — the Meta connection doesn’t carry ads_management.
  • provider_error — Meta rejected the change, returned with its message.
  • 401 or 403 — see Errors, which every tool shares. This one needs mutation:write.

Was this page helpful?