Skip to main content
Google AdsVersion: v3

Upsert segment

PUT/ad-publishing/google/segments

Create or update a Google Ads audience segment

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:adPublishing.write
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Versionstringrequired

API Version

Available optionsv3
Example:v3

Query Parameters

locationIdstringrequired

Location identifier

Example:HChooFuiyPpVYzeJ4HMe
typestringrequired

Segment type

Available optionsCUSTOM_SEGMENTSWEBSITE_VISITORCUSTOMER_MATCHLOOKALIKE
Example:CUSTOM_SEGMENTS

Body

namestringrequired

Segment name

Example:My Segment
descriptionstring

Segment description

Example:Target audience segment
membersobject[]

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

statusstring

Segment status

Example:ENABLED
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.

Example:AUTO
idstring

Segment identifier

Example:seg_123
membershipStatusstring

Membership status

Example:OPEN
ruleBasedUserListobject

Rule-based user list config

membershipLifeSpannumber

Membership life span

Example:30
seedUserListIdsstring[]

Seed user list IDs

Example:["list_1"]
countryCodesstring[]

Country codes

Example:["US","CA"]
expansionLevelstring

Expansion level

Available optionsBALANCEDBROADNARROW
Example:BALANCED

Response

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

oneOf
resourceNamestringrequired

Google Ads resource name

Example:customers/6776452901/customAudiences/874396901
idstringrequired

Segment id

Example:874396901
statusstringrequired

Segment status

Example:ENABLED
namestringrequired

Segment name

Example:Running shoe shoppers
typestringrequired

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

Example:AUTO
membersobject[]required

Keywords, URLs and apps that define the segment