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.
Call through Alter
Section titled “Call through Alter”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 osfrom alter_sdk import Appfrom 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()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | Model | Required within parent | Expand Upsert Google campaign — request body — body |
Referenced models: Upsert Google campaign — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root |
Schemas
Section titled “Schemas”19 more schemas are linked from the tables above, on the schema pages.
Upsert Google campaign — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
adGroups | array | Optional | Campaign ad groups |
adGroups[] | Model | Each item | Expand Upsert Google campaign — request body — body ad Groups item |
adSchedule | array | Optional | Ad schedule rules |
adSchedule[] | Model | Each item | Expand Upsert Google campaign — request body — body ad Schedule item |
advancedOptions | object | Optional | Advanced options |
advertisingChannelSubType | string | Optional | Channel sub type One of: DEMAND_GEN |
advertisingChannelType | string | Required within parent | Advertising channel One of: SEARCH, DISCOVERY, DISPLAY, HOTEL, LOCAL, MULTI_CHANNEL, PERFORMANCE_MAX, DEMAND_GEN |
assets | JSON | Optional | Campaign assets |
assets (allOf 1) | Model | All variants apply | Expand Upsert Google campaign — request body — body assets business Logo, calls, images, lead Form, sitelinks |
audience | JSON | Optional | Campaign audience targeting |
audience (allOf 1) | Model | All variants apply | Expand Upsert Google campaign — request body — body audience age Range, gender, geo Locations, locales, segments, target Interests |
biddingStrategy | JSON | Optional | Bidding strategy config |
biddingStrategy (allOf 1) | Model | All variants apply | Expand Upsert Google campaign — request body — body bidding Strategy type, value |
budget | JSON | Optional | Campaign budget |
budget (allOf 1) | Model | All variants apply | Expand Upsert Google campaign — request body — body / budget / budgetType: DAILY, LIFETIME |
campaignGoal | JSON | Optional | Campaign goal config |
campaignGoal (allOf 1) | Model | All variants apply | Expand Upsert Google campaign — request body — body / campaignGoal / type: CONVERSIONS, CLICK, YOUTUBE ENGAGEMENT |
goalType | string | Optional | Goal type One of: WEBSITE_TRAFFIC, LEAD |
googleAdAccountId | string | Optional | Google Ad account identifier |
googleCampaignId | string | Optional | Google Ads campaign resource ID |
id | string | Optional | Campaign identifier |
isEuPoliticalAds | boolean | Optional | EU political ads flag |
locationId | string | Required within parent | Location identifier |
maximumCpc | number | Optional | Maximum CPC bid in micros |
name | string | Required within parent | Campaign name |
networkSettings | JSON | Optional | Network settings |
networkSettings (allOf 1) | Model | All variants apply | Expand Upsert Google campaign — request body — body network Settings target Content Network, target Search Network |
publishingStatus | string | Optional | Publishing status One of: DRAFT, SCHEDULED, PUBLISHED, PUBLISHING, FAILED, IN_REVIEW, PAUSED, ARCHIVED, WITH_ISSUES, REJECTED |
source | string | Optional | Traffic source |
unpublishedChanges | boolean | Optional | Whether 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
adCampaignId | string | Optional | Ad campaign identifier |
adContent | array | Optional | Ad content items |
adContent[] | Model | Each item | Expand Upsert Google campaign — request body — body ad Groups item ad Content item |
adGroupError | string | Optional | Ad group-level error from Google |
adGroupId | string | Optional | Google ad group identifier |
audience | JSON | Optional | Ad group audience targeting |
audience (allOf 1) | Model | All variants apply | Expand Upsert Google campaign — request body — body ad Groups item audience geo Locations, locales |
customChannels | boolean | Optional | Custom channels flag |
googleAdGroupId | string | Optional | Google Ads ad group resource ID |
googleAudienceId | string | Optional | Google audience resource ID |
id | string | Optional | Ad group identifier |
keywords | JSON | Optional | Keyword targeting |
keywords (allOf 1) | Model | All variants apply | Expand Upsert Google campaign — request body — body ad Groups item keywords negatives, positives |
name | string | Optional | Ad group name |
publishingStatus | string | Optional | Ad group publishing status One of: DRAFT, SCHEDULED, PUBLISHED, PUBLISHING, FAILED, IN_REVIEW, PAUSED, ARCHIVED, WITH_ISSUES, REJECTED |
selectedChannels | array | Optional | Selected channel placements |
selectedChannels[] | string | Each item | One 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
dayOfWeek | string | Required within parent | Day of week One of: FRIDAY, MONDAY, SATURDAY, SUNDAY, THURSDAY, TUESDAY, UNKNOWN, UNSPECIFIED, WEDNESDAY, ALL_DAYS, MONDAY_TO_FRIDAY, SATURDAY_AND_SUNDAY |
from | string | Required within parent | Start time (HH:MM) |
to | string | Required within parent | End time (HH:MM) |
Upsert Google campaign — request body — body assets business Logo, calls, images, lead Form, sitelinks
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
businessLogo | JSON | Optional | Business logo asset |
businessLogo (allOf 1) | Model | All variants apply | Expand Upsert Google campaign — request body — body assets business Logo, calls, images, lead Form, sitelinks images item |
calls | array | Optional | Call extension asset resource names |
calls[] | string | Each item | |
images | array | Optional | Image assets |
images[] | Model | Each item | Expand Upsert Google campaign — request body — body assets business Logo, calls, images, lead Form, sitelinks images item |
leadForm | string | Optional | Lead form asset resource name |
sitelinks | array | Optional | Sitelink asset resource names |
sitelinks[] | string | Each 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
type | string | Optional | Bidding strategy type |
value | number | Optional | Bid value in micros |
Upsert Google campaign — request body — body / budget / budgetType: DAILY, LIFETIME
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | number | Optional | Budget amount in micros |
budgetType | string | Optional | Budget type One of: DAILY, LIFETIME |
scheduleEndDate | string | Optional | Schedule end date |
scheduleStartDate | string | Optional | Schedule start date |
Upsert Google campaign — request body — body / campaignGoal / type: CONVERSIONS, CLICK, YOUTUBE ENGAGEMENT
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
isCustomConversionGoal | boolean | Optional | Whether this is a custom conversion goal |
type | string | Required within parent | Campaign goal type One of: CONVERSIONS, CLICK, YOUTUBE_ENGAGEMENT |
value | string | Optional | Goal value (e.g. conversion action resource name) |
Policy, approvals and errors
Section titled “Policy, approvals and errors”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"}