Ads
Edit a Meta Ads campaign or ad set budget via API
Changing the budget is a PATCH with budget at the level where the budget lives: on the campaign if it uses a campaign budget (CBO), or on the ad set if each ad set has its own (ABO). Values are in the client account's currency, with no conversion to cents and no Meta API to implement.
The request
PATCH /api/ads/campaigns/{id}?customer_integration=<connection uuid>
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Idempotency-Key: <unique key>
{
"budget": {
"amount": 80,
"type": "daily"
},
"facebook_ads": {
"spend_cap": 2000
}
}What you can do
- Change the budget of a CBO campaign with PATCH /ads/campaigns/{id}.
- Change the budget of an ABO ad set with PATCH /ads/adsets/{id}.
- Switch the type between daily and lifetime.
- Set or remove the campaign's spending limit with facebook_ads.spend_cap.
- Adjust the ad set's schedule in the same PATCH, with schedule.start and schedule.end.
Rules and limits
- The budget sits on the campaign (CBO) or on each ad set (ABO), never on both. There is no level field: the level is where the budget is.
- Budget on an ABO campaign, or on an ad set of a CBO campaign, returns 409 budget_level_mismatch, and budget_level tells you the right level.
- budget.amount is in the account's currency, never in cents.
- budget.type lifetime requires schedule.end on the ad set.
- spend_cap null removes the campaign's spending limit.
- Idempotency-Key is optional on PATCH. The response is synchronous (200).
Main fields
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | In the path: the object's id (or the Connect uuid). |
| budget.amount | number | Yes | New amount, in the ad account's currency, never in cents. |
| budget.type | string | No | daily or lifetime. lifetime requires schedule.end on the ad set. |
| facebook_ads.spend_cap | number | No | Campaign only: spending limit, in the account's currency. null removes it. |
| schedule.end | string | No | Ad set only: end date, required with a lifetime budget. |
Who it is for
Budget control in your dashboard
The client raises or lowers a campaign's daily budget right in your product.
Automatic pacing
Lower the budget of ad sets that passed the month's target and raise the ones below it.
AI agent that reallocates budget
The agent reads performance, moves budget between ABO ad sets and records each change.
Works with
Meta Ads
Frequently asked questions
How do I know whether my budget sits on the campaign or the ad set?
By the level where the budget was created. If you send it to the wrong level, the response is 409 budget_level_mismatch with budget_level showing the right one.
Is the value in cents?
No. budget.amount is in the ad account's currency, for example 50 for 50 dollars.
Can I cap a campaign's total spend?
Yes, with facebook_ads.spend_cap on the campaign. Sending null removes the cap.
See Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
