Skip to content

HighLevel: Upsert Google campaign

HighLevel adPublishing.googleUpsertCampaign: arguments, response, policy and SDK examples.

← Ad publishing operations · Get started

Operation gohighlevel.google_upsert_campaign

Provider route: PUT /ad-publishing/google/ads. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/gohighlevel with npm, or alter-sdk-gohighlevel with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { HighLevelIntegration } from "@alter-ai/gohighlevel";
async function execute(input: Parameters<HighLevelIntegration["adPublishing"]["googleUpsertCampaign"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new HighLevelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.adPublishing.googleUpsertCampaign(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_gohighlevel import HighLevelIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = HighLevelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.ad_publishing.google_upsert_campaign(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyModelRequired within parentExpand Upsert Google campaign — request body — body

Referenced models: Upsert Google campaign — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot

19 more schemas are linked from the tables above, on the schema pages.

Upsert Google campaign — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
adGroupsarrayOptionalCampaign ad groups
adGroups[]ModelEach itemExpand Upsert Google campaign — request body — body ad Groups item
adSchedulearrayOptionalAd schedule rules
adSchedule[]ModelEach itemExpand Upsert Google campaign — request body — body ad Schedule item
advancedOptionsobjectOptionalAdvanced options
advertisingChannelSubTypestringOptionalChannel sub type
One of: DEMAND_GEN
advertisingChannelTypestringRequired within parentAdvertising channel
One of: SEARCH, DISCOVERY, DISPLAY, HOTEL, LOCAL, MULTI_CHANNEL, PERFORMANCE_MAX, DEMAND_GEN
assetsJSONOptionalCampaign assets
assets (allOf 1)ModelAll variants applyExpand Upsert Google campaign — request body — body assets business Logo, calls, images, lead Form, sitelinks
audienceJSONOptionalCampaign audience targeting
audience (allOf 1)ModelAll variants applyExpand Upsert Google campaign — request body — body audience age Range, gender, geo Locations, locales, segments, target Interests
biddingStrategyJSONOptionalBidding strategy config
biddingStrategy (allOf 1)ModelAll variants applyExpand Upsert Google campaign — request body — body bidding Strategy type, value
budgetJSONOptionalCampaign budget
budget (allOf 1)ModelAll variants applyExpand Upsert Google campaign — request body — body / budget / budgetType: DAILY, LIFETIME
campaignGoalJSONOptionalCampaign goal config
campaignGoal (allOf 1)ModelAll variants applyExpand Upsert Google campaign — request body — body / campaignGoal / type: CONVERSIONS, CLICK, YOUTUBE ENGAGEMENT
goalTypestringOptionalGoal type
One of: WEBSITE_TRAFFIC, LEAD
googleAdAccountIdstringOptionalGoogle Ad account identifier
googleCampaignIdstringOptionalGoogle Ads campaign resource ID
idstringOptionalCampaign identifier
isEuPoliticalAdsbooleanOptionalEU political ads flag
locationIdstringRequired within parentLocation identifier
maximumCpcnumberOptionalMaximum CPC bid in micros
namestringRequired within parentCampaign name
networkSettingsJSONOptionalNetwork settings
networkSettings (allOf 1)ModelAll variants applyExpand Upsert Google campaign — request body — body network Settings target Content Network, target Search Network
publishingStatusstringOptionalPublishing status
One of: DRAFT, SCHEDULED, PUBLISHED, PUBLISHING, FAILED, IN_REVIEW, PAUSED, ARCHIVED, WITH_ISSUES, REJECTED
sourcestringOptionalTraffic source
unpublishedChangesbooleanOptionalWhether the campaign has unpublished changes

Referenced models: Upsert Google campaign — request body — body ad Groups item, Upsert Google campaign — request body — body ad Schedule item, Upsert Google campaign — request body — body assets business Logo, calls, images, lead Form, sitelinks, Upsert Google campaign — request body — body bidding Strategy type, value, Upsert Google campaign — request body — body / budget / budgetType: DAILY, LIFETIME, Upsert Google campaign — request body — body audience age Range, gender, geo Locations, locales, segments, target Interests, Upsert Google campaign — request body — body / campaignGoal / type: CONVERSIONS, CLICK, YOUTUBE ENGAGEMENT, Upsert Google campaign — request body — body network Settings target Content Network, target Search Network

Upsert Google campaign — request body — body ad Groups item
FieldTypePresenceDescription and constraints
$objectRoot
adCampaignIdstringOptionalAd campaign identifier
adContentarrayOptionalAd content items
adContent[]ModelEach itemExpand Upsert Google campaign — request body — body ad Groups item ad Content item
adGroupErrorstringOptionalAd group-level error from Google
adGroupIdstringOptionalGoogle ad group identifier
audienceJSONOptionalAd group audience targeting
audience (allOf 1)ModelAll variants applyExpand Upsert Google campaign — request body — body ad Groups item audience geo Locations, locales
customChannelsbooleanOptionalCustom channels flag
googleAdGroupIdstringOptionalGoogle Ads ad group resource ID
googleAudienceIdstringOptionalGoogle audience resource ID
idstringOptionalAd group identifier
keywordsJSONOptionalKeyword targeting
keywords (allOf 1)ModelAll variants applyExpand Upsert Google campaign — request body — body ad Groups item keywords negatives, positives
namestringOptionalAd group name
publishingStatusstringOptionalAd group publishing status
One of: DRAFT, SCHEDULED, PUBLISHED, PUBLISHING, FAILED, IN_REVIEW, PAUSED, ARCHIVED, WITH_ISSUES, REJECTED
selectedChannelsarrayOptionalSelected channel placements
selectedChannels[]stringEach itemOne of: GMAIL, YOUTUBE_IN_STREAM, YOUTUBE_SHORTS, YOUTUBE_IN_FEED, DISCOVER, DISPLAY

Referenced models: Upsert Google campaign — request body — body ad Groups item ad Content item, Upsert Google campaign — request body — body ad Groups item audience geo Locations, locales, Upsert Google campaign — request body — body ad Groups item keywords negatives, positives

Upsert Google campaign — request body — body ad Schedule item
FieldTypePresenceDescription and constraints
$objectRoot
dayOfWeekstringRequired within parentDay of week
One of: FRIDAY, MONDAY, SATURDAY, SUNDAY, THURSDAY, TUESDAY, UNKNOWN, UNSPECIFIED, WEDNESDAY, ALL_DAYS, MONDAY_TO_FRIDAY, SATURDAY_AND_SUNDAY
fromstringRequired within parentStart time (HH:MM)
tostringRequired within parentEnd time (HH:MM)
Upsert Google campaign — request body — body assets business Logo, calls, images, lead Form, sitelinks
FieldTypePresenceDescription and constraints
$objectRoot
businessLogoJSONOptionalBusiness logo asset
businessLogo (allOf 1)ModelAll variants applyExpand Upsert Google campaign — request body — body assets business Logo, calls, images, lead Form, sitelinks images item
callsarrayOptionalCall extension asset resource names
calls[]stringEach item
imagesarrayOptionalImage assets
images[]ModelEach itemExpand Upsert Google campaign — request body — body assets business Logo, calls, images, lead Form, sitelinks images item
leadFormstringOptionalLead form asset resource name
sitelinksarrayOptionalSitelink asset resource names
sitelinks[]stringEach item

Referenced models: Upsert Google campaign — request body — body assets business Logo, calls, images, lead Form, sitelinks images item

Upsert Google campaign — request body — body bidding Strategy type, value
FieldTypePresenceDescription and constraints
$objectRoot
typestringOptionalBidding strategy type
valuenumberOptionalBid value in micros
Upsert Google campaign — request body — body / budget / budgetType: DAILY, LIFETIME
FieldTypePresenceDescription and constraints
$objectRoot
amountnumberOptionalBudget amount in micros
budgetTypestringOptionalBudget type
One of: DAILY, LIFETIME
scheduleEndDatestringOptionalSchedule end date
scheduleStartDatestringOptionalSchedule start date
Upsert Google campaign — request body — body / campaignGoal / type: CONVERSIONS, CLICK, YOUTUBE ENGAGEMENT
FieldTypePresenceDescription and constraints
$objectRoot
isCustomConversionGoalbooleanOptionalWhether this is a custom conversion goal
typestringRequired within parentCampaign goal type
One of: CONVERSIONS, CLICK, YOUTUBE_ENGAGEMENT
valuestringOptionalGoal value (e.g. conversion action resource name)

SDK function policy ID: gohighlevel.google_upsert_campaign. Catalog operation: google-upsert-campaign. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["adPublishing.write"]

Pinned headers: {"Version": "v3"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.