Apply a Google Ads budget recommendation
Applies a Google Ads budget recommendation to a campaign, raising what it can spend per day.
Take recommendation_resource_name, recommended_daily_budget_micros and recommendation_type from a suggestion returned by List campaign optimization suggestions whose recommendation_type is CAMPAIGN_BUDGET.
You do not choose the amount. Base44 re-reads the recommendation from Google and applies Google’s current figure. recommended_daily_budget_micros is the amount you are confirming, not a value to set: if Google’s figure has changed since you read the suggestion, the call is rejected with a 409 so nobody raises a budget to a number they never saw. Read the suggestions again and resend.
This changes real spend. Applying the same recommendation twice is safe: the second call changes nothing and returns already_applied set to true.
Some recommendations cover a budget shared by several campaigns. Applying one raises the budget for all of them, so Base44 rejects it with a 409 unless every campaign it touches is one you manage here.
Authorizations
Personal API key.
Path Parameters
ID of the app whose Google Ads campaigns to manage.
Base44's ID for the campaign, as returned in id by List campaigns. This is not the Google Ads campaign ID, which is reported separately as google_campaign_id.
Body
Request shape for the user-approved budget-recommendation apply.
recommendation_resource_name is Google's customers/.../recommendations/...
id (used for idempotency + server-side re-resolution). The route re-fetches
the recommendation from Google and applies Google's own recommended amount
for the recommendation's target campaign, so the request body amount is
advisory only (what the user saw) and a tampered value can't change what is
applied. It is still bounds-checked by update_campaign_budget.
Google's identifier for the recommendation, taken from action_payload on the suggestion you are applying.
1"customers/1234567890/recommendations/AbC123"
The daily budget the suggestion showed, in micros. This confirms what you saw rather than choosing an amount: if Google's current figure differs, the call is rejected with a 409 and nothing changes.
45000000
The suggestion's recommendation_type, recorded for auditing.
"CAMPAIGN_BUDGET"
Response
The campaign's budget after the change.
The campaign's budget after applying Google's recommendation.
Base44's ID for the campaign whose budget changed.
"68b1c0d4e7b91d003c45a1f2"
The campaign's daily budget after the change, in micros.
45000000
true when this recommendation had already been applied and nothing changed on this call, so a retry is safe. Absent when the call applied the change.
true