Upsert segment
PUT/ad-publishing/google/segments
Create or update a Google Ads audience segment
Request
API Version
v3Location identifier
Segment type
CUSTOM_SEGMENTSWEBSITE_VISITORCUSTOMER_MATCHLOOKALIKE- application/json
- Body
- Example (auto)
Bodyrequired
Segment name
Segment description
Segment members — keywords, URLs, or apps that define the custom segment
Segment status
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.
Segment identifier
Membership status
Rule-based user list config
Membership life span
Seed user list IDs
Country codes
Expansion level
BALANCEDBROADNARROW{
"name": "My Segment",
"description": "Target audience segment",
"members": [
{
"memberType": "KEYWORD",
"keyword": "digital marketing"
},
{
"memberType": "URL",
"url": "https://example.com"
},
{
"memberType": "APP",
"app": "com.example.app"
}
],
"status": "ENABLED",
"type": "AUTO",
"id": "seg_123",
"membershipStatus": "OPEN",
"ruleBasedUserList": {
"prepopulationStatus": "REQUESTED",
"flexibleRuleUserList": {
"inclusiveOperands": [],
"exclusiveOperands": []
}
},
"membershipLifeSpan": 30,
"seedUserListIds": [
"list_1"
],
"countryCodes": [
"US",
"CA"
],
"expansionLevel": "BALANCED"
}
The saved segment, shaped by the requested type: a custom audience for CUSTOM_SEGMENTS, or a Google user list for DATA_SEGMENTS.
- application/json
- Schema
- Example (auto)
Schema
- oneOf
- GoogleSegmentDetailDTO
- GoogleDataSegmentDetailDTO
Google Ads resource name
Segment id
Segment status
Segment name
Google custom-audience type. AUTO is the default applied when none is supplied on create.
Keywords, URLs and apps that define the segment
{
"resourceName": "customers/6776452901/customAudiences/874396901",
"id": "874396901",
"status": "ENABLED",
"name": "Running shoe shoppers",
"type": "AUTO",
"members": [
{
"memberType": "KEYWORD",
"keyword": "running shoes",
"url": "www.example.com",
"app": "app.example.com"
}
]
}