Update Google Ads campaign

Changed on

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Changes one section of a campaign and pushes it to Google.

Send the section in field and its new value in value. One section per request. To change a name and a budget, send two requests. Every list in value is the COMPLETE set the campaign should end up with, so an item you leave out is removed unless the field says otherwise, and a key you don't send leaves that setting as it is. An unknown key or a value of the wrong type returns a 422.

Changing ad_copy sends the new text back through Google's policy review, so the campaign can return to a reviewing state and stop serving until it clears. Changing budget takes effect for the rest of the current day.

Google validates the change, so text that breaks its policies or a budget below the currency's floor comes back as a 400 with Google's reason and the campaign is left as it was. To change the budget on several campaigns at once, use Update campaign budgets in bulk.

<Note>The response carries id plus only the section you changed, not the whole campaign. Read the campaign back with Get campaign when you need its full state.</Note>

<Note>This endpoint accepts a personal API key. Workspace API keys are not authorized for it and are rejected with a 403.</Note>

<Warning>A 409 means the change may or may not have been applied. The request to Google Ads timed out after it was sent. Read the campaign back with Get campaign before retrying, or you can end up applying it twice.</Warning>

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time. Send only the fields documented here. Other request fields are not supported and their behavior can change.</Warning>

patch/api/apps/{app_id}/google-ads/campaigns/{campaign_id}

Request

  • Base URL
    https://app.base44.com
  • URL
    https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/{campaign_id}
  • Auth
    HTTP bearer

Path parameters

app_idstring required

ID of the app whose Google Ads campaigns to manage.

campaign_idstring required

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.

Request body

OR
OR
OR
OR
OR
OR
OR
OR
OR

Example request

{
  "value": "Spring sale in Berlin"
}

Response

Successful Response

idstring nullable

Base44's ID for the campaign. Absent when you changed images, which reports updated_field_types instead.

campaign_namestring nullable

Present when you changed name.

daily_budget_microsinteger nullable

Present when you changed budget.

Example response

{
  "id": "68b1c0d4e7b91d003c45a1f2",
  "campaign_name": "Spring sale in Berlin",
  "daily_budget_micros": 15000000
}

Changes

    • breaking

      the request's body type changed from object to no type

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      added request discriminator

    • info

      added to the request body oneOf list

    • info

      the endpoint scheme security PersonalAccessTokenAuth was added to the API