Create New Ad Group

📘

URL: POST/api/v1/adGroups

Note:

  • This API supports batch operations with a max batch size of 10. For bulk operation, the advertiserId must be the same across all requests in the payload
  • Creating multiple ad groups with different targeting types is supported in Bulk. For example: A single bulk payload can include one ad group Create request with keyword targeting and another ad group create request with contextual targeting
  • You must set all of: budgetType, dailyBudget, totalBudget, startDate, endDate, and deliverySpeed parameters at same level i.e. either at campaign level or ad group level
  • Supports both expression-based and flattened targeting structure. Only one of expression based or flattened structure should be used in a request. More details here

Request Body

Core Parameters

ParameterDescriptionRequiredData TypePossible Values / Notes
advertiserIdID of the advertiser for whom the ad group(s) should be created.YIntegerA valid advertiser ID
  • wert
  • fggsd
campaignIdID of the campaign this ad group belongs to.YIntegerA valid campaign ID
nameName of the ad group. Maximum length: 255 characters.YStringValid name of the ad group
startDateDate on which the ad group is set to go live.ConditionalString
  • Required if not set at the ad group level
  • Must be ISO 8601 format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX
  • Campaigns must start on the hour
  • Minutes and seconds are truncated (e.g., 23:45 → 23:00)
endDateDate when the ad group ends.ConditionalString
  • Required if not set at the ad group level
  • Must be ISO 8601 format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX
  • Use 9999-12-30T00:00:00Z for indefinite run
  • Campaigns must end on the hour
  • Minutes and seconds are truncated (e.g., 23:45 → 23:00)
  • Campaigns cannot end before 12:00 PM ET, except:
  • If endDate is set to 00:00 (e.g., 2025-07-20T00:00:00-05:00), it is interpreted as the end of the previous day (2025-07-19T23:59:00-05:00)
rateTypePricing structure for the ad group.NStringcpm
budgetTypeType of budget allocation.ConditionalString
  • daily
  • total
  • Required if not set at the campaign level
  • Ad groups scheduled to run indefinitely must use a daily budget
dailyBudgetDaily budget of the ad group.ConditionalDouble
  • Required if budgetType is daily
  • Minimum value: $0.01
totalBudgetTotal budget of the ad group.ConditionalDouble
  • Required if budgetType is total
  • Minimum value: $0.01
deliverySpeedDetermines pacing of ad delivery.ConditionalString
  • frontloaded
  • evenly
  • Required if not set at the campaign level
  • Frontloaded pacing is not supported when budgetType is daily
creativeRotationModeRotation strategy for creatives during delivery.NString
  • OPTIMIZE_PERFORMANCE (default)
  • ROTATE_EVENLY
frequencyCapDayMax impressions per user per day.NIntegerValid range: 1–511
frequencyCapWeekMax impressions per user per week.NIntegerValid range: 3–511
frequencyCapMonthMax impressions per user per month.NIntegerValid range: 5–511
maxBidMaximum bid for the ad group.NDoubleMinimum value: $0.01
targetingJSON object that defines the audience, contextual, keyword, and geographic targeting criteria for an ad group.
Note: You must choose one structure; mixing flat and expression-based schemas in a single payload is not supported.
NJSON objectContains targeting parameters, see Targeting Object section below for more details.

Targeting Object

The targeting object can either be replaced fully or can be incrementally updated using add and remove arrays.

For Ad Groups with Keywords and Negative Keywords Targeting

ParameterParameter DescriptionTypeRequiredPossible Values
keywordTextText that defines the keywordstringYAdvertiser ID for which the campaign needs to be updated for delivery status
matchTypeMatching criteria for the keywordsstringYbroad, exact
For negative keywords only exact matchType is allowed

For Ad Groups with Contextual Targeting

ParameterParameter DescriptionTypeRequiredPossible Values
idID of the contextual nodeintegerY
reachDetermines contextual reach.This is how tiers in API call map to the representation on ad center UI:
Tier mapping:
  • low = [tier_1, tier_2 ]
  • mid = [tier_3, tier_4 ]
  • high = [tier_5, tier_6, tier_7 ]
stringY
  • tier_1
  • tier2
  • tier_3
  • tier_4
  • tier_5
  • tier_6
  • tier_7

For Ad Groups with Behavioral Targeting

ParameterParameter DescriptionTypeRequiredPossible Values
idID of the audience obtained from List targeting endpointintegerY
audienceTypeType of audiencestringY
  • retail
  • brand
  • persona
  • custom
  • demographic
attributeAttribute of the audiencestringY
  • For category:
    • historical
    • predictive
  • For brand:
    • historical
    • predictive
    • lapsed_buyers
  • For persona:
    • lifestyle
    • lifestage
    • auto
    • shopping_habits
    • food_beverages
  • For demographic:
    • age
    • gender
    • household_income

For Ad Groups with ROS Targeting

ParameterParameter DescriptionTypeRequiredPossible Values
runOfSiteIndicates whether run‑of‑site targeting is enabledbooleanY
  • true
  • false

Geo targeting 

Can be set to one of: 

  • Country
  • State,City
  • DMA
  • Zip code

If omitted will be default set to country (US). You cannot combine different geo-targeting types within a single ad group

ParameterParameter DescriptionTypeRequiredPossible Values
idis used for Country, State, City or DMA targetsintegerY
zipCodeis used for zip code targeting.We only support ZIP codes within the USA currentlystringY


📌

Rules

  • startDate >= today’s date
  • startDate <= endDate
  • total and daily budget should be >= max bid
  • You can only set either dailyBudget or totalBudget
  • To set daily budget, you must choose value of budgetType as “daily” and then define dailyBudget.
  • To set total budget, you must choose value of budgetType as “total” and then define totalBudget.
  • Budget, Schedule and Delivery speed must be set either at campaign or ad group level
  • You must set all of budgetType, dailyBudget, totalBudget, startDate, endDate, and deliverySpeed parameters at same level i.e. either at campaign level or ad group level, not both
  • IDs with isDisabled = true from POST/api/v1/targeting/list cannot be used for targeting
  • Campaigns must be homogeneous: if mediaType is VIDEO, all ad groups will be VIDEO; if mediaType is BANNER, all ad groups will be BANNER. Mixing VIDEO and BANNER ad groups within the same campaign is not allowed.
  • mediaType, if included in the request payload, is ignored and has no effect on processing.
  • Ad groups created to run definitely can be updated later to include an end date.
📌

Targeting Rules

  • Only one of keywords, contextual, behavioral, or runOfSite is allowed.
  • geoTargets can be combined via an AND relation with that tactic.
  • All targeting combinations must use the and array format, as shown in the sample requests.
  • For geo targeting (Refer to the sample requests for creating an Ad Group with ROS to see how zip codes are used in geo-targeting):
    • In an ad group, geo targeting can be set to one of:
      • Country
      • State, City
      • DMA
      • Zip code
    • You cannot combine different geo-targeting types within a single ad group
    • If geo targeting is not specified, the default Country (US) level targeting will be applied
  • When setting up targeting for Video Ad Groups, the following restrictions apply:
    • Keywords targeting is not supported for ad groups in campaigns with mediaType = VIDEO.
    • Ad groups with runOfSite targeting will not serve on Item Page placement.
    • Ad groups with contextual targeting will not serve on Homepage Feature_4

Headers

Header NameDescriptionRequiredValues
AuthorizationThe token will provide you the access to the API. It is same for all advertisers you access through the API.YPlease utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide
Content-TypeFormat of the message bodyYapplication/json
WM_CONSUMER.IDUnique ID for consumer. We will provide you the consumer ID to access the API. It is same for all advertisers you access through the API.   YPlease use the generated ConsumerId shared with you at the time of partner onboarding. Refer to the Getting Started Guide for more information
WM_SEC.AUTH_SIGNATUREAuth signature as an API key.YUse the signature generator code from Getting Started Guide to generate this value
WM_SEC.KEY_VERSIONKey version. We will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the API.Y1
WM_CONSUMER.intimestampTimestamp for which the auth signature is generated. Use Unix epoch format for the timestamp.YUse the signature generator code from Getting Started Guide to generate this value


Sample Request: Create Ad Group with Keyword Targeting (using Expression Targeting Structure)

curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>'
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
 --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' --data '[ { "campaignId": 1, "advertiserId": 1, "name": "Ad group 1" , "startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z", "rateType": "cpm", "budgetType": "daily", "dailyBudget": 500, "deliverySpeed": "evenly", "creativeRotationMode": "OPTIMIZE_PERFORMANCE", "frequencyCapDay": 1, "frequencyCapWeek": 3, "frequencyCapMonth": 5, "baseBid": 0.1, "maxBid": 0.5, "targeting": { "and": [ { "and": [ { "keywords": [ { "keywordText": "test-keyword-1", "matchType": "broad" }, { "keywordText": "test-keyword-2", "matchType": "broad" } ] }, { "not": [ { "keywords": [ { "keywordText": "test-keyword-3", "matchType": "exact" } ] } ] } ] }, { "geoTargets": [ { "id": 123 }, { "id": 234 }, { "id": 235 } ] } ] } } ]'

Sample Request - Create Ad Group with Keyword Targeting (using Flattened Targeting Structure)

curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>'
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
 --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' --data '[ { "campaignId": 1, "advertiserId": 1, "name": "Ad group 1" , "startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z", "rateType": "cpm", "budgetType": "daily", "dailyBudget": 500, "deliverySpeed": "evenly", "creativeRotationMode": "OPTIMIZE_PERFORMANCE", "frequencyCapDay": 1, "frequencyCapWeek": 3, "frequencyCapMonth": 5, "baseBid": 0.1, "maxBid": 0.5, "targeting": { "keywords": { "include": [ { "matchType": "BROAD", "keywordText": "running shoes" }, { "matchType": "PHRASE", "keywordText": "trail sneakers" } ], "exclude": [ { "matchType": "EXACT", "keywordText": "free shoes" }, { "matchType": "EXACT", "keywordText": "cheap shoes" } ] }, "geoTargets": { "include": [{ "id": 123 }, { "id": 234 } ] } } } ]'

Sample Request: Create Ad Group with Contextual Targeting (using Expression Targeting Structure)

curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>'
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
 --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' --data ' [ {
"campaignId": 1,
"advertiserId": 1,
"name": "Ad group 1" ,
"startDate": "2023-12-01T12:00:00Z",
"endDate": "2023-12-09T12:00:00Z",
"rateType" : "cpm",
"budgetType" : "daily",
"dailyBudget": 500,
"deliverySpeed" : "evenly",
"creativeRotationMode":"OPTIMIZE_PERFORMANCE",
"frequencyCapDay" : 1, "frequencyCapWeek" : 3, "frequencyCapMonth" : 5,
"baseBid" : 0.1,
"maxBid" : 0.5, "targeting" : { "and": [ { "contextual": [ { "id": 3452, "reach": "tier_2" }, { "id": 2343, "reach": "tier_3" } ] }, { "geoTargets": [ { "id": 123 }, { "id": 234 }, { "id": 235 } ] } ] } }
]'

Sample Request: Create Ad Group with Contextual Targeting (using Flattened Targeting Structure)

curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>'
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
 --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' --data ' [ {
"campaignId": 1,
"advertiserId": 1,
"name": "Ad group 1" ,
"startDate": "2023-12-01T12:00:00Z",
"endDate": "2023-12-09T12:00:00Z",
"rateType" : "cpm",
"budgetType" : "daily",
"dailyBudget": 500,
"deliverySpeed" : "evenly",
"creativeRotationMode":"OPTIMIZE_PERFORMANCE",
"frequencyCapDay" : 1, "frequencyCapWeek" : 3, "frequencyCapMonth" : 5,
"baseBid" : 0.1,
"maxBid" : 0.5, "targeting": { "contextual": { "include": [ { "id": 3452, "reach": "tier_2" }, { "id": 3453, "reach": "tier_1" } ] }, "geoTargets": { "include": [{ "id": 123 }, { "id": 234 } ] }
} }
]'

Sample Request: Create Ad Group with Audience Targeting (using Expression Targeting Structure)

curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>'
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
 --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779'
--data ' [ {
"campaignId": 1,
"advertiserId": 1,
"name": "Ad group 1" ,
"startDate": "2023-12-01T12:00:00Z",
"endDate": "2023-12-09T12:00:00Z",
"rateType" : "cpm",
"budgetType" : "total",
"totalBudget": 5000,
"deliverySpeed" : "evenly",
"creativeRotationMode": "OPTIMIZE_PERFORMANCE"",
"frequencyCapDay" : 1,
"frequencyCapWeek" : 3,
"frequencyCapMonth" : 5,
"baseBid" : 0.1,
"maxBid" : 0.5, "targeting": { "and": [ { "and": [ { "behavioral": [ { "audienceType": "retail", "attribute": "historical", "id": 134 }, { "audienceType": "retail", "attribute": "historical", "id": 243234 } ] }, { "not": [ { "behavioral": [ { "audienceType": "retail", "attribute": "historical", "id": 134 }, { "audienceType": "retail", "attribute": "historical", "id": 243234 } ] } ] }, { "geoTargets": [ { "id": 123 }, { "id": 234 }, { "id": 235 } ] } ] }
}
]'

Sample Request: Create ad group with Audience Targeting (using Flattened Targeting Structure)

curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>'
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
 --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779'
--data ' [ {
"campaignId": 1,
"advertiserId": 1,
"name": "Ad group 1" ,
"startDate": "2023-12-01T12:00:00Z",
"endDate": "2023-12-09T12:00:00Z",
"rateType" : "cpm",
"budgetType" : "total",
"totalBudget": 5000,
"deliverySpeed" : "evenly",
"creativeRotationMode": "OPTIMIZE_PERFORMANCE"",
"frequencyCapDay" : 1,
"frequencyCapWeek" : 3,
"frequencyCapMonth" : 5,
"baseBid" : 0.1,
"maxBid" : 0.5, "targeting": { "behavioral": { "include": [ { "audienceType": "retail", "attribute": "historical", "id": 134 }, { "audienceType": "retail", "attribute": "historical", "id": 234 } ], "exclude": [ { "audienceType": "retail", "attribute": "historical", "id": 123 }, { "audienceType": "retail", "attribute": "historical", "id": 111 } ] }, "geoTargets": { "include": [{ "id": 123 }, { "id": 234 } ] }
} }
]'

Sample Request: Create Ad Group with ROS Targeting (using Expression Targeting Structure)

curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>'
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
 --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' --data ' [ {
"campaignId": 1,
"advertiserId": 1,
"name": "Ad group 1" ,
"startDate": "2023-12-01T12:00:00Z",
"endDate": "2023-12-09T12:00:00Z",
"rateType" : "cpm",
"budgetType" : "total",
"totalBudget": 5000,
"deliverySpeed" : "evenly",
"creativeRotationMode": "OPTIMIZE_PERFORMANCE"", "frequencyCapDay" : 1, "frequencyCapWeek" : 3, "frequencyCapMonth" : 5,
"baseBid" : 0.1,
"maxBid" : 0.5, "targeting" : { "and": [ { "runOfSite": true }, { "geoTargets": [ { "zipCode": "35004" } ] } ]
} }
]'

Sample Request: Create Ad Group with ROS Targeting (using Flattened Targeting Structure)

curl -X POST \
'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>'
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
 --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' --data ' [ {
"campaignId": 1,
"advertiserId": 1,
"name": "Ad group 1" ,
"startDate": "2023-12-01T12:00:00Z",
"endDate": "2023-12-09T12:00:00Z",
"rateType" : "cpm",
"budgetType" : "total",
"totalBudget": 5000,
"deliverySpeed" : "evenly",
"creativeRotationMode": "OPTIMIZE_PERFORMANCE"", "frequencyCapDay" : 1, "frequencyCapWeek" : 3, "frequencyCapMonth" : 5,
"baseBid" : 0.1,
"maxBid" : 0.5, { "targeting": { "runOfSite": true, "geoTargets": { "include": [ { "zipCode": 35004 } ] } } }
}
]'

Sample Request: Create Multiple Ad Groups in a Single Call (Expression Targeting Structure)

curl -X POST \
'https: //developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>'
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779'
--data '[ { "campaignId": 1, "advertiserId": 1, "name": "Ad group 1", "startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z", "rateType": "cpm", "budgetType": "daily", "dailyBudget": 500, "deliverySpeed": "evenly", "creativeRotationMode": "OPTIMIZE_PERFORMANCE", "frequencyCapDay": 1, "frequencyCapWeek": 3, "frequencyCapMonth": 5, "baseBid": 0.1, "maxBid": 0.5, "targeting": { "and": [ { "and": [ { "keywords": [ { "keywordText": "test-keyword-1", "matchType": "broad" }, { "keywordText": "test-keyword-2", "matchType": "broad" } ] }, { "not": [ { "keywords": [ { "keywordText": "test-keyword-3", "matchType": "exact" } ] } ] } ] }, { "geoTargets": [ { "id": 123 }, { "id": 234 }, { "id": 235 } ] } ] } }, { "campaignId": 2, "advertiserId": 1, "name": "Ad group 2", "startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z", "rateType": "cpm", "budgetType": "daily", "dailyBudget": 500, "deliverySpeed": "evenly", "creativeRotationMode": "OPTIMIZE_PERFORMANCE", "frequencyCapDay": 1, "frequencyCapWeek": 3, "frequencyCapMonth": 5, "baseBid": 0.1, "maxBid": 0.5, "targeting": { "and": [ { "contextual": [ { "id": 3452, "reach": "tier_2" }, { "id": 2343, "reach": "tier_3" } ] }, { "geoTargets": [ { "zipCode": "35004" } ] } ] } }
]'

Sample Request: Create Multiple Ad Groups in a Single Call (Flattened Targeting Structure)

curl -X POST \
'https: //developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/adGroups' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>'
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779'
--data '[ { "campaignId": 1, "advertiserId": 1, "name": "Ad group 1", "startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z", "rateType": "cpm", "budgetType": "daily", "dailyBudget": 500, "deliverySpeed": "evenly", "creativeRotationMode": "OPTIMIZE_PERFORMANCE", "frequencyCapDay": 1, "frequencyCapWeek": 3, "frequencyCapMonth": 5, "baseBid": 0.1, "maxBid": 0.5, "targeting": { "keywords": { "include": [ { "matchType": "BROAD", "keywordText": "running shoes" }, { "matchType": "PHRASE", "keywordText": "trail sneakers" } ], "exclude": [ { "matchType": "EXACT", "keywordText": "free shoes" }, { "matchType": "EXACT", "keywordText": "bad shoes" } ] }, "geoTargets": { "include": [ { "id": 123 }, { "id": 234 } ] } } }, { "campaignId": 2, "advertiserId": 1, "name": "Ad group 2", "startDate": "2023-12-01T12:00:00Z", "endDate": "2023-12-09T12:00:00Z", "rateType": "cpm", "budgetType": "daily", "dailyBudget": 500, "deliverySpeed": "evenly", "creativeRotationMode": "OPTIMIZE_PERFORMANCE", "frequencyCapDay": 1, "frequencyCapWeek": 3, "frequencyCapMonth": 5, "baseBid": 0.1, "maxBid": 0.5, "targeting": { "contextual": { "include": [ { "id": 3452, "reach": "tier_2" }, { "id": 3452, "reach": "tier_2" } ] } }, "geoTargets": { "include": [ { "id": 123 }, { "id": 234 } ] } } }
]'

Response

ElementDescriptionType
codeThe response code can have following values:
  • success
  • failure

Click here for more information about Status Codes and Errors
string
detailsDetails will populate success or error message depending upon value of codestring
nameName of the campaignstring
adGroupIdID of the Ad Group. This will be returned only when code=successinteger
campaignIdID of the campaign. This will be returned only when code=successinteger

Sample Response Success - Create ad group with Keyword targeting (using Expression Targeting Structure)

[ { "code": "success", "details": "string", "name": "string", "campaignId": 1, "adGroupId": 1234 }
] 

Sample Response Failure - Create ad group with Keyword targeting (using Expression Targeting Structure)

[ { "code": "failure", "details": ["string"], "name": "string1", "campaignId": 1 }
]

Sample Response Succes - Create ad group with Keyword targeting (using Flattened Targeting Structure)

[ { "code": "success", "details": "string", "name": "string", "campaignId": 1, "adGroupId": 1234 }
]

Sample Response Failure - Create ad group with Keyword targeting (using Flattened Targeting Structure)

[ { "code": "failure", "details": ["string"], "name": "string1", "campaignId": 1 }
]

Sample Response Succes - Create ad group with Contextual targeting (using Expression Targeting Structure)

[ { "code": "success", "details": "string", "name": "string", "campaignId": 1, "adGroupId": 1234 }
]

Sample Response Failure - Create ad group with Contextual targeting (using Expression Targeting Structure)

[ { "code": "failure", "details": ["string"], "name": "string1", "campaignId": 1 }
]

Sample Response Success - Create ad group with Contextual targeting (using Flattened Targeting Structure)

[ { "code": "success", "details": "string", "name": "string", "campaignId": 1, "adGroupId": 1234 }
]

Sample Response Failure - Create ad group with Contextual targeting (using Flattened Targeting Structure)

[ { "code": "failure", "details": ["string"], "name": "string1", "campaignId": 1 }
]

Sample Response Success - Create ad group with audience targeting (using Expression Targeting Structure)

[ { "code": "success", "details": "string", "name": "string", "campaignId": 1, "adGroupId": 1234 }
]

Sample Response Failure - Create ad group with audience targeting (using Expression Targeting Structure)

[ { "code": "failure", "details": ["string"], "name": "string1", "campaignId": 1 }
]

Sample Response Success - Create ad group with audience targeting (using Flattened Targeting Structure)

[ { "code": "success", "details": "string", "name": "string", "campaignId": 1, "adGroupId": 1234 }
]

Sample Response Failure - Create ad group with audience targeting (using Flattened Targeting Structure)

[ { "code": "failure", "details": ["string"], "name": "string1", "campaignId": 1 }
]

Sample Response Success - Create Ad Group with ROS Targeting (using Expression Targeting Structure)

[ { "code": "success", "details": "string", "name": "string", "campaignId": 1, "adGroupId": 1234 }
]

Sample Response Failure - Create Ad Group with ROS Targeting (using Expression Targeting Structure)

[ { "code": "failure", "details": ["string"], "name": "string1", "campaignId": 1 }
]

Sample Response Success - Create Ad Group with ROS Targeting (using Flattened Targeting Structure)

[ { "code": "success", "details": "string", "name": "string", "campaignId": 1, "adGroupId": 1234 }
]

Sample Response Failure - Create Ad Group with ROS Targeting (using Flattened Targeting Structure)

[ { "code": "failure", "details": ["string"], "name": "string1", "campaignId": 1 }
]

Sample Response Success - Create Multiple Ad Groups in a Single Call (Expression Targeting Structure)

[ { "code": "success", "details": "string", "name": "string1", "campaignId": 1, "adGroupId": 1234 }, { "code": "success", "details": "string", "name": "string1", "campaignId": 2, "adGroupId": 1234 } ]

Sample Response Failure - Create Multiple Ad Groups in a Single Call (Expression Targeting Structure)

[ { "code": "success", "details": "string", "name": "string1", "campaignId": 1, "adGroupId": 1234 }, { "code": "failure", "details": ["string"], "name": "string1", "campaignId": 2 } ]

Sample Response Success - Create Multiple Ad Groups in a Single Call (Flattened Targeting Structure)

[ { "code": "success", "details": "string", "name": "string1", "campaignId": 1, "adGroupId": 1234 }, { "code": "success", "details": "string", "name": "string1", "campaignId": 2, "adGroupId": 1234 } ]

Sample Response Failure - Create Multiple Ad Groups in a Single Call (Flattened Targeting Structure)

[ { "code": "success", "details": "string", "name": "string1", "campaignId": 1, "adGroupId": 1234 }, { "code": "failure", "details": ["string"], "name": "string1", "campaignId": 2 } ]