Skip to main content
Version: v3

Upsert segment

PUT 

/ad-publishing/google/segments

Create or update a Google Ads audience segment

Request

Version stringrequired

API Version

Available optionsv3
locationId stringrequired

Location identifier

type stringrequired

Segment type

Available optionsCUSTOM_SEGMENTSWEBSITE_VISITORCUSTOMER_MATCHLOOKALIKE
application/json

Bodyrequired

    namestringrequired

    Segment name

    descriptionstring

    Segment description

    membersobject[]

    Segment members — keywords, URLs, or apps that define the custom segment

    statusstring

    Segment status

    typestring

    Google custom-audience type, used only when the type query parameter is CUSTOM_SEGMENTS. Defaults to AUTO when omitted. This is NOT the same field as the type query parameter, which selects which kind of segment to upsert — settable values here are AUTO, INTEREST, PURCHASE_INTENT and SEARCH.

    idstring

    Segment identifier

    membershipStatusstring

    Membership status

    ruleBasedUserListobject

    Rule-based user list config

    membershipLifeSpannumber

    Membership life span

    seedUserListIdsstring[]

    Seed user list IDs

    countryCodesstring[]

    Country codes

    expansionLevelstring

    Expansion level

    Available optionsBALANCEDBROADNARROW
application/json

The saved segment, shaped by the requested type: a custom audience for CUSTOM_SEGMENTS, or a Google user list for DATA_SEGMENTS.

Schema
    oneOf
    resourceNamestringrequired

    Google Ads resource name

    idstringrequired

    Segment id

    statusstringrequired

    Segment status

    namestringrequired

    Segment name

    typestringrequired

    Google custom-audience type. AUTO is the default applied when none is supplied on create.

    membersobject[]required

    Keywords, URLs and apps that define the segment