Due to the iOS 14.5 launch, changes have been made to this endpoint.
POST /{ad-account-id}/adsets
endpoint for iOS 14.5 SKAdNetwork campaigns.The adsets of this ad account
GET /v20.0/act_<AD_ACCOUNT_ID>/adsets?fields=name%2Cid%2Cstatus HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/act_<AD_ACCOUNT_ID>/adsets?fields=name%2Cid%2Cstatus',
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
"/act_<AD_ACCOUNT_ID>/adsets",
{
"fields": "name,id,status"
},
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
Bundle params = new Bundle();
params.putString("fields", "name,id,status");
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/act_<AD_ACCOUNT_ID>/adsets",
params,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
NSDictionary *params = @{
@"fields": @"name,id,status",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/act_<AD_ACCOUNT_ID>/adsets"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
curl -X GET -G \
-d 'fields="name,id,status"' \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v20.0/act_<AD_ACCOUNT_ID>/adsets
Parameter | Description |
---|---|
date_preset
enum {TODAY, YESTERDAY, THIS_MONTH, LAST_MONTH, THIS_QUARTER, MAXIMUM, DATA_MAXIMUM, LAST_3D, LAST_7D, LAST_14D, LAST_28D, LAST_30D, LAST_90D, LAST_WEEK_MON_SUN, LAST_WEEK_SUN_SAT, LAST_QUARTER, LAST_YEAR, THIS_WEEK_MON_TODAY, THIS_WEEK_SUN_TODAY, THIS_YEAR}
|
Predefine date range used to aggregate insights metrics |
effective_status
list<enum{ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO, CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED, IN_PROCESS, WITH_ISSUES}>
|
Effective status of adset |
is_completed
boolean
|
Filter adset by completed status |
time_range
{'since':YYYY-MM-DD,'until':YYYY-MM-DD}
|
Date range used to aggregate insights metrics |
since
datetime
|
A date in the format of "YYYY-MM-DD", which means from the beginning midnight of that day. |
until
datetime
|
A date in the format of "YYYY-MM-DD", which means to the beginning midnight of the following day. |
updated_since
integer
|
Time since the Adset has been updated. |
Reading from this edge will return a JSON formatted result:
{ "
data
": [], "paging
": {}, "summary
": {} }
summary
Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=insights
).
Field | Description |
---|---|
insights
Edge<AdsInsights>
|
Analytics summary for all objects. Use nested parameters
with this field. |
total_count
unsigned int32
|
Total number of objects |
Error | Description |
---|---|
100 | Invalid parameter |
190 | Invalid OAuth 2.0 Access Token |
613 | Calls to this api have exceeded the rate limit. |
200 | Permissions error |
80004 | There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting#ads-management. |
80000 | There have been too many calls from this ad-account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting#ads-insights. |
3018 | The start date of the time range cannot be beyond 37 months from the current date |
2500 | Error parsing graph query |
Mobile App Install CPA Billing will no longer be supported. The billing event cannot be App Install if the Optimization goal is App Install.
adsets
edge from the following paths:
POST /v20.0/act_<AD_ACCOUNT_ID>/adsets HTTP/1.1
Host: graph.facebook.com
name=My+First+AdSet&daily_budget=10000&bid_amount=300&billing_event=IMPRESSIONS&optimization_goal=REACH&campaign_id=%3CAD_CAMPAIGN_ID%3E&promoted_object=%7B%22page_id%22%3A%22%3CPAGE_ID%3E%22%7D&targeting=%7B%22facebook_positions%22%3A%5B%22feed%22%5D%2C%22geo_locations%22%3A%7B%22countries%22%3A%5B%22US%22%5D%2C%22regions%22%3A%5B%7B%22key%22%3A%224081%22%7D%5D%2C%22cities%22%3A%5B%7B%22key%22%3A777934%2C%22radius%22%3A10%2C%22distance_unit%22%3A%22mile%22%7D%5D%7D%2C%22genders%22%3A%5B1%5D%2C%22age_max%22%3A24%2C%22age_min%22%3A20%2C%22publisher_platforms%22%3A%5B%22facebook%22%2C%22audience_network%22%5D%2C%22device_platforms%22%3A%5B%22mobile%22%5D%2C%22flexible_spec%22%3A%5B%7B%22interests%22%3A%5B%7B%22id%22%3A%22%3CINTEREST_ID%3E%22%2C%22name%22%3A%22%3CINTEREST_NAME%3E%22%7D%5D%7D%5D%7D&status=PAUSED
/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->post(
'/act_<AD_ACCOUNT_ID>/adsets',
array (
'name' => 'My First AdSet',
'daily_budget' => '10000',
'bid_amount' => '300',
'billing_event' => 'IMPRESSIONS',
'optimization_goal' => 'REACH',
'campaign_id' => '<AD_CAMPAIGN_ID>',
'promoted_object' => '{"page_id":"<PAGE_ID>"}',
'targeting' => '{"facebook_positions":["feed"],"geo_locations":{"countries":["US"],"regions":[{"key":"4081"}],"cities":[{"key":777934,"radius":10,"distance_unit":"mile"}]},"genders":[1],"age_max":24,"age_min":20,"publisher_platforms":["facebook","audience_network"],"device_platforms":["mobile"],"flexible_spec":[{"interests":[{"id":"<INTEREST_ID>","name":"<INTEREST_NAME>"}]}]}',
'status' => 'PAUSED',
),
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
"/act_<AD_ACCOUNT_ID>/adsets",
"POST",
{
"name": "My First AdSet",
"daily_budget": "10000",
"bid_amount": "300",
"billing_event": "IMPRESSIONS",
"optimization_goal": "REACH",
"campaign_id": "<AD_CAMPAIGN_ID>",
"promoted_object": "{\"page_id\":\"<PAGE_ID>\"}",
"targeting": "{\"facebook_positions\":[\"feed\"],\"geo_locations\":{\"countries\":[\"US\"],\"regions\":[{\"key\":\"4081\"}],\"cities\":[{\"key\":777934,\"radius\":10,\"distance_unit\":\"mile\"}]},\"genders\":[1],\"age_max\":24,\"age_min\":20,\"publisher_platforms\":[\"facebook\",\"audience_network\"],\"device_platforms\":[\"mobile\"],\"flexible_spec\":[{\"interests\":[{\"id\":\"<INTEREST_ID>\",\"name\":\"<INTEREST_NAME>\"}]}]}",
"status": "PAUSED"
},
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
Bundle params = new Bundle();
params.putString("name", "My First AdSet");
params.putString("daily_budget", "10000");
params.putString("bid_amount", "300");
params.putString("billing_event", "IMPRESSIONS");
params.putString("optimization_goal", "REACH");
params.putString("campaign_id", "<AD_CAMPAIGN_ID>");
params.putString("promoted_object", "{\"page_id\":\"<PAGE_ID>\"}");
params.putString("targeting", "{\"facebook_positions\":[\"feed\"],\"geo_locations\":{\"countries\":[\"US\"],\"regions\":[{\"key\":\"4081\"}],\"cities\":[{\"key\":777934,\"radius\":10,\"distance_unit\":\"mile\"}]},\"genders\":[1],\"age_max\":24,\"age_min\":20,\"publisher_platforms\":[\"facebook\",\"audience_network\"],\"device_platforms\":[\"mobile\"],\"flexible_spec\":[{\"interests\":[{\"id\":\"<INTEREST_ID>\",\"name\":\"<INTEREST_NAME>\"}]}]}");
params.putString("status", "PAUSED");
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/act_<AD_ACCOUNT_ID>/adsets",
params,
HttpMethod.POST,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
NSDictionary *params = @{
@"name": @"My First AdSet",
@"daily_budget": @"10000",
@"bid_amount": @"300",
@"billing_event": @"IMPRESSIONS",
@"optimization_goal": @"REACH",
@"campaign_id": @"<AD_CAMPAIGN_ID>",
@"promoted_object": @"{\"page_id\":\"<PAGE_ID>\"}",
@"targeting": @"{\"facebook_positions\":[\"feed\"],\"geo_locations\":{\"countries\":[\"US\"],\"regions\":[{\"key\":\"4081\"}],\"cities\":[{\"key\":777934,\"radius\":10,\"distance_unit\":\"mile\"}]},\"genders\":[1],\"age_max\":24,\"age_min\":20,\"publisher_platforms\":[\"facebook\",\"audience_network\"],\"device_platforms\":[\"mobile\"],\"flexible_spec\":[{\"interests\":[{\"id\":\"<INTEREST_ID>\",\"name\":\"<INTEREST_NAME>\"}]}]}",
@"status": @"PAUSED",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/act_<AD_ACCOUNT_ID>/adsets"
parameters:params
HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
curl -X POST \
-F 'name="My First AdSet"' \
-F 'daily_budget=10000' \
-F 'bid_amount=300' \
-F 'billing_event="IMPRESSIONS"' \
-F 'optimization_goal="REACH"' \
-F 'campaign_id="<AD_CAMPAIGN_ID>"' \
-F 'promoted_object={
"page_id": "<PAGE_ID>"
}' \
-F 'targeting={
"facebook_positions": [
"feed"
],
"geo_locations": {
"countries": [
"US"
],
"regions": [
{
"key": "4081"
}
],
"cities": [
{
"key": 777934,
"radius": 10,
"distance_unit": "mile"
}
]
},
"genders": [
1
],
"age_max": 24,
"age_min": 20,
"publisher_platforms": [
"facebook",
"audience_network"
],
"device_platforms": [
"mobile"
],
"flexible_spec": [
{
"interests": [
{
"id": "<INTEREST_ID>",
"name": "<INTEREST_NAME>"
}
]
}
]
}' \
-F 'status="PAUSED"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v20.0/act_<AD_ACCOUNT_ID>/adsets
adlabels
Specifies list of labels to be associated with this object. This field is optional
adset_schedule
Ad set schedule, representing a delivery schedule for a single day
start_minute
A 0 based minute of the day representing when the schedule starts
end_minute
A 0 based minute of the day representing when the schedule ends
days
Array of ints representing which days the schedule is active. Valid values are 0-6 with 0 representing Sunday, 1 representing Monday, ... and 6 representing Saturday.
timezone_type
USER
attribution_spec
Conversion attribution spec used for attributing conversions for optimization. Supported window lengths differ by optimization goal and campaign objective.
event_type
window_days
bid_amount
Bid cap or target cost for this ad set. The bid cap used in a lowest cost bid strategy
is defined as the maximum bid you want to pay for a result based on your optimization_goal
. The target cost used in a target cost bid strategy
lets Facebook bid to meet your target on average and keep costs stable as you spend. If an ad level bid_amount
is specified, updating this value will overwrite the previous ad level bid. Unless you are using Reach and Frequency
, bid_amount
is required if bid_strategy
is set to LOWEST_COST_WITH_BID_CAP
or COST_CAP
.
The bid amount's unit is cents for currencies like USD, EUR, and the basic unit for currencies like JPY, KRW. The bid amount for ads with IMPRESSION
or REACH
as billing_event
is per 1,000 occurrences, and has to be at least 2 US cents or more. For ads with other billing_event
s, the bid amount is for each occurrence, and has a minimum value 1 US cents. The minimum bid amounts of other currencies are of similar value to the US Dollar values provided.
Choose bid strategy for this ad set to suit your specific business goals.
Each strategy has tradeoffs and may be available for certain optimization_goal
s:
LOWEST_COST_WITHOUT_CAP
: Designed to get the most results for your budget based on
your ad set optimization_goal
without limiting your bid amount. This is the best strategy
if you care most about cost efficiency. However with this strategy it may be harder to get
stable average costs as you spend. This strategy is also known as automatic bidding
.
Learn more in Ads Help Center, About bid strategies: Lowest cost
.
LOWEST_COST_WITH_BID_CAP
: Designed to get the most results for your budget based on
your ad set optimization_goal
while limiting actual bid to your specified
amount. With a bid cap you have more control over your
cost per actual optimization event. However if you set a limit which is too low you may
get less ads delivery. If you select this, you must provide
a bid cap with the bid_amount
field.
Note: during creation this bid strategy is set if you provide bid_amount
only.
This strategy is also known as manual maximum-cost bidding
.
Learn more in Ads Help Center, About bid strategies: Lowest cost
.
Notes:
If you enable campaign budget optimization, you should set bid_strategy
at the parent campaign level.
TARGET_COST
bidding strategy has been deprecated with Marketing API v9
.
billing_event
The billing event that this ad set is using:
APP_INSTALLS: Pay when people install your app.
CLICKS: Deprecated.
IMPRESSIONS: Pay when the ads are shown to people.
LINK_CLICKS: Pay when people click on the link of the ad.
OFFER_CLAIMS: Pay when people claim the offer.
PAGE_LIKES: Pay when people like your page.
POST_ENGAGEMENT: Pay when people engage with your post.
VIDEO_VIEWS: Pay when people watch your video ads for at least 10 seconds.
THRUPLAY: Pay for ads that are played to completion, or played for at least 15 seconds.
budget_schedule_specs
Initial high demand periods to be created with the ad set.
Provide list of time_start
, time_end
, budget_value
, and budget_value_type
.
For example,
-F 'budget_schedule_specs=[{
"time_start":1699081200,
"time_end":1699167600,
"budget_value":100,
"budget_value_type":"ABSOLUTE"
}]'
See High Demand Period
for more details on each field.
id
time_start
time_end
budget_value
budget_value_type
recurrence_type
weekly_schedule
days
minute_start
minute_end
timezone_type
campaign_attribution
campaign_attribution
campaign_id
The ad campaign you wish to add this ad set to.
campaign_spec
Provide name
, objective
and buying_type
for a campaign you want to create. Otherwise you need to provide campaign_id
for an existing ad campaign. For example:
-F 'campaign_spec={
"name": "Inline created campaign",
"objective": "CONVERSIONS",
"buying_type": "AUCTION"
}'
Please refer to the Outcome-Driven Ads Experiences mapping table
to find new objectives and their corresponding destination types, optimization goals and promoted objects.
contextual_bundling_spec
settings of Contextual Bundle to support ads serving in Facebook contextual surfaces
status
creative_sequence
Order of the adgroup sequence to be shown to users
daily_budget
The daily budget defined in your account currency
, allowed only for ad sets with a duration (difference between end_time
and start_time
) longer than 24 hours.
Either daily_budget
or lifetime_budget
must be greater than 0.
daily_imps
Daily impressions. Available only for campaigns with buying_type=FIXED_CPM
daily_min_spend_target
Daily minimum spend target of the ad set defined in your account currency. To use this field, daily budget must be specified in the Campaign. This target is not a guarantee but our best effort.
daily_spend_cap
Daily spend cap of the ad set defined in your account currency. To use this field, daily budget must be specified in the Campaign. Set the value to 922337203685478 to remove the spend cap.
destination_type
Destination of ads in this Ad Set. Options include: Website, App, Messenger, INSTAGRAM_DIRECT
, INSTAGRAM_PROFILE
.
dsa_beneficiary
dsa_beneficiary
dsa_payor
dsa_payor
end_time
End time, required when lifetime_budget
is specified. e.g. 2015-03-12 23:59:59-07:00
or 2015-03-12 23:59:59 PDT
. When creating a set with a daily budget, specify end_time=0
to set the set to be ongoing and have no end date. UTC UNIX timestamp
execution_options
Set
An execution setting
validate_only
: when this option is specified, the API call will not perform the mutation but will run through the validation rules against values of each field.
include_recommendations
: this option cannot be used by itself. When this option is used, recommendations for ad object's configuration will be included. A separate section recommendations
will be included in the response, but only if recommendations for this specification exist.
If the call passes validation or review, response will be {"success": true}
. If the call does not pass, an error will be returned with more details. These options can be used to improve any UI to display errors to the user much sooner, e.g. as soon as a new value is typed into any field corresponding to this ad object, rather than at the upload/save stage, or after review.
existing_customer_budget_percentage
existing_customer_budget_percentage
frequency_control_specs
An array of frequency control specs for this ad set. As there is only one event type currently supported, this array has no more than one element. Writes to this field are only available in ad sets where REACH
is the objective.
event
Event name, only IMPRESSIONS
currently.
interval_days
Interval period in days, between 1 and 90 (inclusive)
max_frequency
The maximum frequency, between 1 and 90 (inclusive)
Indicates the ad set must only be used for dynamic creatives. Dynamic creative ads can be created in this ad set. Defaults to false
lifetime_budget
Lifetime budget, defined in your account currency
. If specified, you must also specify an end_time
.
Either daily_budget
or lifetime_budget
must be greater than 0.
lifetime_imps
Lifetime impressions. Available only for campaigns with buying_type=FIXED_CPM
lifetime_min_spend_target
Lifetime minimum spend target of the ad set defined in your account currency. To use this field, lifetime budget must be specified in the Campaign. This target is not a guarantee but our best effort.
lifetime_spend_cap
Lifetime spend cap of the ad set defined in your account currency. To use this field, lifetime budget must be specified in the Campaign. Set the value to 922337203685478 to remove the spend cap.
max_budget_spend_percentage
max_budget_spend_percentage
min_budget_spend_percentage
min_budget_spend_percentage
multi_optimization_goal_weight
multi_optimization_goal_weight
name
Ad set name, max length of 400 characters.
optimization_goal
What the ad set is optimizing for.
APP_INSTALLS
: Will optimize for people more likely to install your app.
ENGAGED_USERS
: Will optimize for people more likely to take a particular action in your app.
EVENT_RESPONSES
: Will optimize for people more likely to attend your event.
IMPRESSIONS
: Will show the ads as many times as possible.
LEAD_GENERATION
: Will optimize for people more likely to fill out a lead generation form.
LINK_CLICKS
: Will optimize for people more likely to click in the link of the ad.
OFFER_CLAIMS
: Will optimize for people more likely to claim the offer.
OFFSITE_CONVERSIONS
: Will optimize for people more likely to make a conversion in the site
PAGE_ENGAGEMENT
: Will optimize for people more likely to engage with your page.
PAGE_LIKES
: Will optimize for people more likely to like your page.
POST_ENGAGEMENT
: Will optimize for people more likely to engage with your post.
REACH
: Optimize to reach the most unique users of each day or interval specified in frequency_control_specs
.
SOCIAL_IMPRESSIONS
: Increase the number of impressions with social context. For example, with the names of one or more of the user's friends attached to the ad who have already liked the page or installed the app.
VALUE
: Will optimize for maximum total purchase value within the specified attribution window.
THRUPLAY
: Will optimize delivery of your ads to people are more likely to play your ad to completion, or play it for at least 15 seconds.
AD_RECALL_LIFT
: Optimize for people more likely to remember seeing your ads.
VISIT_INSTAGRAM_PROFILE
: Optimize for visits to the advertiser's instagram profile.
optimization_sub_event
Optimization sub event for a specific optimization goal (ex: Sound-On event for Video-View-2s optimization goal)
pacing_type
Defines the pacing type, standard by default or using ad scheduling
promoted_object
The object this ad set is promoting across all its ads. Required with certain campaign objectives. CONVERSIONS
pixel_id
(Conversion pixel ID)pixel_id
(Facebook pixel ID) and custom_event_type
pixel_id
(Facebook pixel ID) and pixel_rule
and custom_event_type
event_id
(Facebook event ID) and custom_event_type
application_id
, object_store_url
, and custom_event_type
for
mobile app eventsoffline_conversion_data_set_id
(Offline dataset ID) and custom_event_type
for offline conversionspage_id
page_id
application_id
and object_store_url
for mobile app or Canvas app engagement link clicksapplication_id
and object_store_url
optimization_goal
is OFFSITE_CONVERSIONS
application_id
, object_store_url
, and custom_event_type
(Standard Events)application_id
, object_store_url
, custom_event_type = OTHER
and custom_event_str
(Custom Events)product_set_id
product_set_id
and custom_event_type
optimization_goal
is LEAD_GENERATION
, page_id
needs to be passed as promoted_object.application_id
The ID of a Facebook Application. Usually related to mobile or canvas games being promoted on Facebook for installs or engagement
pixel_id
The ID of a Facebook conversion pixel. Used with offsite conversion campaigns.
custom_event_type
The event from an App Event of a mobile app, not in the standard event list.
object_store_url
The uri of the mobile / digital store where an application can be bought / downloaded. This is platform specific. When combined with the "application_id" this uniquely specifies an object which can be the subject of a Facebook advertising campaign.
offer_id
The ID of an Offer from a Facebook Page.
page_id
The ID of a Facebook Page
product_catalog_id
The ID of a Product Catalog. Used with Dynamic Product Ads .
product_item_id
The ID of the product item.
instagram_profile_id
The ID of the instagram profile id.
product_set_id
The ID of a Product Set within an Ad Set level Product Catalog. Used with Dynamic Product Ads .
event_id
The ID of a Facebook Event
offline_conversion_data_set_id
The ID of the offline dataset.
fundraiser_campaign_id
The ID of the fundraiser campaign.
custom_event_str
The event from an App Event of a mobile app, not in the standard event list.
mcme_conversion_id
The ID of a MCME conversion.
conversion_goal_id
The ID of a Conversion Goal.
offsite_conversion_event_id
The ID of a Offsite Conversion Event
boosted_product_set_id
The ID of the Boosted Product Set within an Ad Set level Product Catalog. Should only be present when the advertiser has opted into Product Set Boosting.
lead_ads_form_event_source_type
The event source of lead ads form.
value_semantic_type
The semantic of the event value to be using for optimization
omnichannel_object
app
pixel
onsite
whatsapp_phone_number
rf_prediction_id
Reach and frequency prediction ID
source_adset_id
The source adset id that this ad is copied from (if applicable).
start_time
The start time of the set, e.g. 2015-03-12 23:59:59-07:00
or 2015-03-12 23:59:59 PDT
. UTC UNIX timestamp
status
Only ACTIVE
and PAUSED
are valid for creation. The other statuses
can be used for update. If it is set to PAUSED
, all its active ads
will be paused and have an effective status ADSET_PAUSED
.
targeting
An ad set's targeting structure. "countries" is required. See targeting .
time_based_ad_rotation_id_blocks
Specify ad creative that displays at custom date ranges in a campaign
as an array. A list of Adgroup IDs. The list of ads to display for each
time range in a given schedule. For example display first ad in Adgroup
for first date range, second ad for second date range, and so on. You
can display more than one ad per date range by providing more than
one ad ID per array. For example set time_based_ad_rotation_id_blocks
to [[1], [2, 3], [1, 4]]. On the
first date range show ad 1, on the second date range show ad 2 and ad 3
and on the last date range show ad 1 and ad 4. Use with time_based_ad_rotation_intervals
to specify date ranges.
time_based_ad_rotation_intervals
Date range when specific ad creative displays during a campaign.
Provide date ranges in an array of UNIX timestamps where each
timestamp represents the start time for each date range. For example a
3-day campaign from May 9 12am to May 11 11:59PM PST can have three
date ranges, the first date range starts from May 9 12:00AM to
May 9 11:59PM, second date range starts from May 10 12:00AM to
May 10 11:59PM and last starts from May 11 12:00AM to May 11 11:59PM.
The first timestamp should match the campaign start time. The last
timestamp should be at least 1 hour before the campaign end time. You
must provide at least two date ranges. All date ranges must cover the
whole campaign length, so any date range cannot exceed campaign length.
Use with time_based_ad_rotation_id_blocks
to specify ad creative for
each date range.
time_start
Time start
time_stop
Time stop
tune_for_category
tune_for_category
id
in the return type.id
: numeric string,success
: bool,Error | Description |
---|---|
100 | Invalid parameter |
2695 | The ad set creation reached its campaign group(ios14) limit. |
368 | The action attempted has been deemed abusive or is otherwise disallowed |
200 | Permissions error |
2641 | Your ad includes or excludes locations that are currently restricted |
900 | No such application exists. |
2635 | You are calling a deprecated version of the Ads API. Please update to the latest version. |
190 | Invalid OAuth 2.0 Access Token |
This operation has been deprecated with Marketing API V8 .