HighLevel: Upsert assets
HighLevel adPublishing.googleUpsertAssets: arguments, response, policy and SDK examples.
← Ad publishing operations · Get started
Operation gohighlevel.google_upsert_assets
Provider route: POST /ad-publishing/google/assets. 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"]["googleUpsertAssets"]>[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.googleUpsertAssets(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_assets(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 assets — request body — body |
Referenced models: Upsert assets — 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”Upsert assets — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
locationId | string | Required within parent | Location identifier |
payload | JSON | Required within parent | Asset payload — shape depends on the type field: CallAssetPayload (CALL), SitelinkAssetPayload (SITELINK), or LeadFormAssetPayload (LEAD_FORM) |
payload (oneOf 1) | Model | Alternative | Expand Upsert assets — request body — body payload ad Schedule Targets, call Conversion Action, country Code, phone Number, resource Name |
payload (oneOf 2) | Model | Alternative | Expand Upsert assets — request body — body payload ad Schedule Targets, description1, description2, end Date, final Urls, link Text, resource Name, start Date |
payload (oneOf 3) | Model | Alternative | Expand Upsert assets — request body — body / payload / desiredIntent: LOW INTENT, HIGH INTENT, post Submit Call To Action Type: VISIT SITE, DOWNLOAD, LEARN MORE, SHOP NOW |
type | string | Required within parent | Asset type to create or update One of: CALL, SITELINK, LEAD_FORM |
Referenced models: Upsert assets — request body — body payload ad Schedule Targets, call Conversion Action, country Code, phone Number, resource Name, Upsert assets — request body — body / payload / desiredIntent: LOW INTENT, HIGH INTENT, post Submit Call To Action Type: VISIT SITE, DOWNLOAD, LEARN MORE, SHOP NOW, Upsert assets — request body — body payload ad Schedule Targets, description1, description2, end Date, final Urls, link Text, resource Name, start Date
Upsert assets — request body — body payload ad Schedule Targets, call Conversion Action, country Code, phone Number, resource Name
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
adScheduleTargets | array | Optional | Ad schedule targets restricting when the call asset is shown |
adScheduleTargets[] | Model | Each item | Expand Upsert assets — request body — body payload ad Schedule Targets, call Conversion Action, country Code, phone Number, resource Name ad Schedule Targets item |
callConversionAction | string | Optional | Call conversion action resource name |
countryCode | string | Required within parent | Two-letter ISO country code |
phoneNumber | string | Required within parent | Phone number for call ads |
resourceName | string | Optional | Google Ads resource name for an existing call asset |
Referenced models: Upsert assets — request body — body payload ad Schedule Targets, call Conversion Action, country Code, phone Number, resource Name ad Schedule Targets item
Upsert assets — request body — body / payload / desiredIntent: LOW INTENT, HIGH INTENT, post Submit Call To Action Type: VISIT SITE, DOWNLOAD, LEARN MORE, SHOP NOW
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
backgroundImageAsset | string | Optional | Background image asset resource name |
businessName | string | Required within parent | Business name shown on the form |
callToActionDescription | string | Optional | Description text for the CTA button |
callToActionType | string | Required within parent | Call to action button type One of: LEARN_MORE, GET_QUOTE, APPLY_NOW, SIGN_UP, CONTACT_US, SUBSCRIBE, DOWNLOAD, BOOK_NOW, GET_OFFER, REGISTER, GET_INFO, REQUEST_DEMO, JOIN_NOW, GET_STARTED, VISIT_SITE |
customQuestionFields | array | Optional | Custom question fields appended after standard fields |
customQuestionFields[] | Model | Each item | Expand Upsert assets — request body — body / payload / desiredIntent: LOW INTENT, HIGH INTENT, post Submit Call To Action Type: VISIT SITE, DOWNLOAD, LEARN MORE, SHOP NOW custom Question Fields item |
description | string | Required within parent | Lead form description |
desiredIntent | string | Optional | Desired lead intent level One of: LOW_INTENT, HIGH_INTENT |
fields | array | Required within parent | Form fields to collect user input |
fields[] | Model | Each item | Expand Upsert assets — request body — body / payload / desiredIntent: LOW INTENT, HIGH INTENT, post Submit Call To Action Type: VISIT SITE, DOWNLOAD, LEARN MORE, SHOP NOW fields item |
finalUrls | string | Optional | Final URL shown after form submission |
headline | string | Required within parent | Lead form headline |
postSubmitCallToActionType | string | Optional | Post-submit CTA button type One of: VISIT_SITE, DOWNLOAD, LEARN_MORE, SHOP_NOW |
postSubmitDescription | string | Optional | Description shown after form submission |
postSubmitHeadline | string | Optional | Headline shown after form submission |
privacyPolicyUrl | string | Required within parent | Privacy policy URL |
resourceName | string | Optional | Google Ads resource name for an existing lead form asset |
Referenced models: Upsert assets — request body — body / payload / desiredIntent: LOW INTENT, HIGH INTENT, post Submit Call To Action Type: VISIT SITE, DOWNLOAD, LEARN MORE, SHOP NOW custom Question Fields item, Upsert assets — request body — body / payload / desiredIntent: LOW INTENT, HIGH INTENT, post Submit Call To Action Type: VISIT SITE, DOWNLOAD, LEARN MORE, SHOP NOW fields item
Upsert assets — request body — body payload ad Schedule Targets, description1, description2, end Date, final Urls, link Text, resource Name, start Date
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
adScheduleTargets | array | Optional | Ad schedule targets restricting when the sitelink is shown |
adScheduleTargets[] | Model | Each item | Expand Upsert assets — request body — body payload ad Schedule Targets, call Conversion Action, country Code, phone Number, resource Name ad Schedule Targets item |
description1 | string | Optional | First description line |
description2 | string | Optional | Second description line |
endDate | string | Optional | End date for the sitelink (YYYY-MM-DD) |
finalUrls | string | Required within parent | Final landing page URL |
linkText | string | Required within parent | Sitelink display text |
resourceName | string | Optional | Google Ads resource name for an existing sitelink asset |
startDate | string | Optional | Start date for the sitelink (YYYY-MM-DD) |
Referenced models: Upsert assets — request body — body payload ad Schedule Targets, call Conversion Action, country Code, phone Number, resource Name ad Schedule Targets item
Upsert assets — request body — body payload ad Schedule Targets, call Conversion Action, country Code, phone Number, resource Name ad Schedule Targets item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
dayOfWeek | string | Required within parent | Day of the week for this schedule One of: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY |
endHour | number | Required within parent | End hour in 24h format (0-23) |
endMinute | string | Required within parent | Minute mark the schedule ends at One of: ZERO, FIFTEEN, THIRTY, FORTY_FIVE |
startHour | number | Required within parent | Start hour in 24h format (0-23) |
startMinute | string | Required within parent | Minute mark the schedule starts at One of: ZERO, FIFTEEN, THIRTY, FORTY_FIVE |
Upsert assets — request body — body / payload / desiredIntent: LOW INTENT, HIGH INTENT, post Submit Call To Action Type: VISIT SITE, DOWNLOAD, LEARN MORE, SHOP NOW custom Question Fields item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
customQuestionText | string | Required within parent | Custom question text shown to the user |
singleChoiceAnswers | array | Required within parent | Answer choices for the custom question |
singleChoiceAnswers[] | string | Each item |
Upsert assets — request body — body / payload / desiredIntent: LOW INTENT, HIGH INTENT, post Submit Call To Action Type: VISIT SITE, DOWNLOAD, LEARN MORE, SHOP NOW fields item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
inputType | string | Required within parent | Field input type from Google Ads LeadFormFieldUserInputType |
singleChoiceAnswers | array | Optional | Single-choice answer options for the field |
singleChoiceAnswers[] | string | Each item |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: gohighlevel.google_upsert_assets. Catalog operation: google-upsert-assets. 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"}