1

Facebook (as usual) has incredibly unhelpful documentation on their API. I am trying to do a simple task of updating an adset's budget. The adset already exists in my account so I am not looking to create an adset via the api - though that is apparently all facebook would like you to do.

I've done this successfully at the campaign level by making a simple request to the api with this (simplified) call

var headers = {
    'method': 'POST',
}

var url = `https://graph.facebook.com/v16.0/${campaignID}?daily_budget=${newBudget}&fields=daily_budget&transport=cors&access_token=${fbToken}`

Unfortunately, making the same request, but with an adset ID instead of a campaign ID, throws an error saying "Unsupported request - method type: post". I have attempted to run the request as a GET method, however that just seems to return the current budget (which makes perfect sense).

I have also found some documentation on facebook's website here: https://developers.facebook.com/docs/marketing-api/bidding/overview/budgets

Unfortunately, even if you provide an existing adset ID as a parameter in the payload, it still only allows you to create an adset at this endpoint. There does not appear to be a way to update the budget of an existing adset as far as I can tell.

UPDATE

There seems to be something wrong with the adset I am attempting to update. I successfully updated the budget of a different adset from an older campaign with no issue. Wondering if maybe there is a period of time before an adset becomes available as an edge on the graph api.

3
  • 1
    I'll note that this may be a bug with the platform. I have now attempted to make a budget update via the graph explorer and via the python business sdk and all have failed with the same error message. Also facebook won't allow me to submit a bug request because they've flagged me as spam for some reason - despite it being my first bug report.
    – ajarshem
    Commented May 2, 2023 at 16:04
  • I would double check if the Adset ID that you are having the issue with is indeed an Adset. I have seen this issue before where the IDs are very very similar at a glance but very subtle differences in the ID make them different objects altogether.
    – bangdel
    Commented May 5, 2023 at 14:18
  • Unfortunately it appears to be a bug with the type of campaign I am running. I have since tested further and can make the call on ad sets within regular campaigns, but it appears that you can not post a budget to an ad set within an automotive inventory campaign at the moment. I’ve submitted a bug report, waiting to see if Facebook responds.
    – ajarshem
    Commented May 5, 2023 at 18:14

1 Answer 1

0

I am able to update daily_budget of an adset with the below API invocation

curl --location 'https://graph.facebook.com/?access_token=__fb_token' --header 'Content-Type: application/json' --data 'batch=[ { "method": "POST","relative_url": "v16.0/{ad_set_id}", "body": "daily_budget=10200" }]' 

But it has many other constraints around, how you should update, and the impact of your update influenced by many other settings. Read below facebook documentation page for more details.

https://developers.facebook.com/docs/marketing-api/adset/budget-limits/v16.0

Not the answer you're looking for? Browse other questions tagged or ask your own question.