Skip to content
Fresh 2026

Campaign

A campaign is the highest level organizational structure within an ad account and should represent a single objective for an advertiser, for example, to drive page post engagement. Setting objective of the campaign will enforce validation on any ads added to the campaign to ensure they also have the correct objective.

The date_preset = lifetime parameter is disabled in Graph API v10.0 and replaced with date_preset = maximum, which returns a maximum of 37 months of data. For v9.0 and below, date_preset = maximum will be enabled on May 25, 2021, and any lifetime calls will default to maximum and return only 37 months of data.

Limits

  • You can only create 200 ad sets per ad campaign. Learn more about the ad campaign structure.
  • If your campaign has more than 70 ad sets and uses Campaign Budget Optimization, you are not able to edit your current bid strategy or turn off CBO. Learn more in the Business Help Center.

New Required Field for All Campaigns

All businesses using the Marketing API must identify whether or not new and edited campaigns belong to a Special Ad Category. Current available categories are: housing, employment, credit, or issues, elections, and politics. Businesses whose ads do not belong to a Special Ad Category must indicate NONE or send an empty array in the special_ad_categories field.

Businesses running housing, employment, or credit ads must comply with targeting and audience restrictions. Targeting for ads about social issues, elections or politics are not affected by the special_ad_categories label.

As of Marketing API 7.0, the special_ad_category parameter on the POST /act_<ad_account_id>/campaigns endpoint has been deprecated and replaced with a new special_ad_categories parameter. The new special_ad_categories parameter is required and accepts an array.

If you use the special_ad_category parameter, it will still return a string, but you should use GET /{campaign-id}?fields=special_ad_categories to get an array back. Refer to Special Ad Category for additional information.

Reading

A campaign is a grouping of ad sets which are organized by the same business objective. Each campaign has an objective that must be valid across the ad sets within that campaign.

After your ads begin delivering, you can query stats for ad campaigns. The statistics returned will be unique stats, deduped across the ad sets. You can also get reports and statistics for all ad sets and ads in an campaign simultaneously.

Example

HTTPPHP SDKJavaScript SDKAndroid SDKiOS SDK Graph API Explorer

GET v25.0/...?fields={fieldname_of_type_Campaign} 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(
    '...?fields={fieldname_of_type_Campaign}',
    '{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(
    "...?fields={fieldname_of_type_Campaign}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "...?fields={fieldname_of_type_Campaign}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]\
                               initWithGraphPath:@"...?fields={fieldname_of_type_Campaign}"\
                                      parameters:params\
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,\
                                      id result,\
                                      NSError *error) {\
    // Handle the result\
}];

If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

ParameterDescription
date_preset<br>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}Date Preset
time_range<br>{'since':YYYY-MM-DD,'until':YYYY-MM-DD}Time Range. Note if time range is invalid, it will be ignored.
since<br>datetimeA date in the format of "YYYY-MM-DD", which means from the beginning midnight of that day.
until<br>datetimeA date in the format of "YYYY-MM-DD", which means to the beginning midnight of the following day.

Fields

FieldDescription
id<br>numeric stringCampaign's ID<br>Default
account_id<br>numeric stringID of the ad account that owns this campaign
adlabels<br>list<AdLabel>Ad Labels associated with this campaign
bid_strategy<br>enum {LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS}Bid strategy for this campaign when you enable campaign budget optimization and<br>when you use AUCTION as your buying type:<br>LOWEST_COST_WITHOUT_CAP: Designed to get the most results for your budget based on<br>your ad set optimization_goal without limiting your bid amount. This is the best strategy to select<br>if you care most about cost efficiency. However, note that it may be harder to get<br>stable average costs as you spend. Note: this strategy is also known as<br>automatic bidding.<br>Learn more in Ads Help Center, About bid strategies: Lowest cost.<br>LOWEST_COST_WITH_BID_CAP: Designed to get the most results for your budget based on<br>your ad set optimization_goal while limiting actual bid to a specified amount.<br>Get specified bid cap in the bid_amount field for each ad set in this ad campaign.<br>This strategy is known as manual maximum-cost bidding.<br>Learn more in Ads Help Center, About bid strategies: Lowest cost.<br>COST_CAP: Designed to get the most results for your budget based on<br>your ad set optimization_goal while limiting actual average cost per optimization event to a specified amount.<br>Get specified cost cap in the bid_amount field for each ad set in this ad campaign.<br>Learn more in Ads Help Center, About bid strategies: Cost Cap.<br>Notes:<br>- If you do not enable campaign budget optimization, you should get bid_strategy at the ad set level.<br>- TARGET_COST bidding strategy has been deprecated with Marketing API v9.
boosted_object_id<br>numeric stringThe Boosted Object this campaign has associated, if any
brand_lift_studies<br>list<AdStudy>Automated Brand Lift V2 studies for this ad set.
budget_rebalance_flag<br>boolWhether to automatically rebalance budgets daily for all the adsets under this campaign. This has been deprecated on Marketing API V7.0.
budget_remaining<br>numeric stringRemaining budget
buying_type<br>stringBuying type, possible values are: <br>AUCTION: default<br>RESERVED: for reach and frequency ads<br>Reach and Frequency is disabled for housing, employment and credit ads.
campaign_group_active_time<br>numeric stringcampaign_group_active_time this is only for Internal, This will have the active running length of Campaign Groups
can_create_brand_lift_study<br>boolIf we can create a new automated brand lift study for the ad set.
can_use_spend_cap<br>boolWhether the campaign can set the spend cap
configured_status<br>enum {ACTIVE, PAUSED, DELETED, ARCHIVED}If this status is PAUSED, all its active ad sets and ads will<br>be paused and have an effective status CAMPAIGN_PAUSED. Prefer<br>using 'status' instead of this.
created_time<br>datetimeCreated Time
daily_budget<br>numeric stringThe daily budget of the campaign
effective_status<br>enum {ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES}IN_PROCESS is available for version 4.0 or higher
has_secondary_skadnetwork_reporting<br>boolhas_secondary_skadnetwork_reporting
is_adset_budget_sharing_enabled<br>boolWhether the child ad sets are managed under ad set budget sharing
is_budget_schedule_enabled<br>boolWhether budget scheduling is enabled for the campaign group
is_reels_trending_ads_enabled<br>boolis_reels_trending_ads_enabled
is_skadnetwork_attribution<br>boolWhen set to true Indicates that the campaign will include SKAdNetwork, iOS 14+.
issues_info<br>list<AdCampaignIssuesInfo>Issues for this campaign that prevented it from deliverying
last_budget_toggling_time<br>datetimeLast budget toggling time
lifetime_budget<br>numeric stringThe lifetime budget of the campaign
name<br>stringCampaign's name
objective<br>stringCampaign's objective<br>See the Outcome Ad-Driven Experience Objective Validation section below for more information.
pacing_type<br>list<string>Defines pacing type of the campaign. The value is an array of options: "standard".
primary_attribution<br>enumprimary_attribution
promoted_object<br>AdPromotedObjectThe object this campaign is promoting across all its ads
smart_promotion_type<br>enumSmart Promotion Type. guided_creation or smart_app_promotion(the choice under APP_INSTALLS objective).
source_campaign<br>CampaignThe source campaign that this campaign is copied from
source_campaign_id<br>numeric stringThe source campaign id that this campaign is copied from
special_ad_categories<br>list<enum>special ad categories
special_ad_category<br>enumThe campaign's Special Ad Category. One of HOUSING, EMPLOYMENT, CREDIT, or NONE.
special_ad_category_country<br>list<enum>Country field for Special Ad Category.
spend_cap<br>numeric stringA spend cap for the campaign, such that it will not spend more than this cap. Expressed as integer value of the subunit in your currency.
start_time<br>datetimeMerging of start_times for the ad sets belonging to this campaign. At the campaign level, start_time is a read only field. You can setup start_time at the ad set level.
status<br>enum {ACTIVE, PAUSED, DELETED, ARCHIVED}If this status is PAUSED, all its active ad sets and ads will<br>be paused and have an effective status CAMPAIGN_PAUSED. The field<br>returns the same value as 'configured_status', and is the suggested<br>one to use.
stop_time<br>datetimeMerging of stop_times for the ad sets belonging to this campaign, if available. At the campaign level, stop_time is a read only field. You can setup stop_time at the ad set level.
topline_id<br>numeric stringTopline ID
updated_time<br>datetimeUpdated Time. If you update spend_cap or daily budget or lifetime budget, this will not automatically update this field.

Edges

EdgeDescription
ad_studies<br>Edge<AdStudy>The ad studies containing this campaign
adrules_governed<br>Edge<AdRule>Ad rules that govern this campaign - by default, this only returns rules that either directly mention the campaign by id or indirectly through the set entity_type
ads<br>Edge<Adgroup>Ads under this campaign
adsets<br>Edge<AdCampaign>The ad sets under this campaign
copies<br>Edge<AdCampaignGroup>The copies of this campaign

Error Codes

ErrorDescription
100Invalid parameter
80004There 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.
613Calls to this api have exceeded the rate limit.
190Invalid OAuth 2.0 Access Token
104Incorrect signature
2500Error parsing graph query
3018The start date of the time range cannot be beyond 37 months from the current date
200Permissions error
2635You are calling a deprecated version of the Ads API. Please update to the latest version.

Creating

You can make a POST request to async_batch_requests edge from the following paths:

  • /act_{ad_account_id}/async_batch_requests

When posting to this edge, a Campaign will be created.

Parameters

ParameterDescription
adbatch<br>list<Object>JSON encoded batch reqeust<br>Required
name<br>stringRequired
relative_url<br>stringRequired
body<br>UTF-8 encoded stringRequired
name<br>UTF-8 encoded stringName of the batch request for tracking purposes.<br>Required

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.

Struct {

id: numeric string,

}

Error Codes

ErrorDescription
194Missing at least one required parameter
100Invalid parameter
2500Error parsing graph query

You can make a POST request to copies edge from the following paths:

  • /{campaign_id}/copies

When posting to this edge, a Campaign will be created.

Parameters

ParameterDescription
deep_copy<br>booleanDefault value: false<br>Whether to copy all the child ads. Limits: the total number of children ads to copy should not exceed 3 for a synchronous call and 51 for an asynchronous call.
end_time<br>datetimeFor deep copy, the end time of the sets under the copied campaign, e.g. 2015-03-12 23:59:59-07:00 or 2015-03-12 23:59:59 PDT. UTC UNIX timestamp. When creating a set with a daily budget, specify end_time=0 to set the set to be ongoing without end date. If not set, the copied sets will inherit the end time from the original set
parameter_overrides<br>Campaign specparameter_overrides
rename_options<br>JSON or object-like arraysRename options
rename_strategy<br>enum {DEEP_RENAME, ONLY_TOP_LEVEL_RENAME, NO_RENAME}Default value: ONLY_TOP_LEVEL_RENAME<br>DEEP_RENAME: will change this object's name and children's names in the copied object. ONLY_TOP_LEVEL_RENAME: will change the this object's name but won't change the children's name in the copied object. NO_RENAME: will change no name in the copied object
rename_prefix<br>stringA prefix to copy names. Defaults to null if not provided.
rename_suffix<br>stringA suffix to copy names. Defaults to null if not provided and appends a localized string of - Copy based on the ad account locale.
start_time<br>datetimeFor deep copy, the start time of the sets under the copied campaign, e.g. 2015-03-12 23:59:59-07:00 or 2015-03-12 23:59:59 PDT. UTC UNIX timestamp. If not set, the copied sets will inherit the start time from the original set
status_option<br>enum {ACTIVE, PAUSED, INHERITED_FROM_SOURCE}Default value: PAUSED<br>ACTIVE: the copied campaign will have active status. PAUSED: the copied campaign will have paused status. INHERITED_FROM_SOURCE: the copied campaign will have the parent status.

Return Type

This endpoint supports read-after-write and will read the node represented by copied_campaign_id in the return type.

Struct {

copied_campaign_id: numeric string,

ad_object_ids: List [

Struct {

ad_object_type: enum {unique_adcreative, ad, ad_set, campaign, opportunities, privacy_info_center, topline, ad_account, product},

source_id: numeric string,

copied_id: numeric string,

}

],

}

Error Codes

ErrorDescription
100Invalid parameter
190Invalid OAuth 2.0 Access Token
200Permissions error

You can make a POST request to campaigns edge from the following paths:

  • /act_{ad_account_id}/campaigns

When posting to this edge, a Campaign will be created.

Example

HTTPPHP SDKJavaScript SDKAndroid SDKiOS SDKcURL Graph API Explorer

POST /v25.0/act_<AD_ACCOUNT_ID>/campaigns HTTP/1.1
Host: graph.facebook.com

name=My+campaign&objective=OUTCOME_TRAFFIC&status=PAUSED&special_ad_categories=%5B%5D&is_adset_budget_sharing_enabled=0
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->post(
    '/act_<AD_ACCOUNT_ID>/campaigns',
    array (
      'name' => 'My campaign',
      'objective' => 'OUTCOME_TRAFFIC',
      'status' => 'PAUSED',
      'special_ad_categories' => '[]',
      'is_adset_budget_sharing_enabled' => '0',
    ),
    '{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>/campaigns",
    "POST",
    {
        "name": "My campaign",
        "objective": "OUTCOME_TRAFFIC",
        "status": "PAUSED",
        "special_ad_categories": "[]",
        "is_adset_budget_sharing_enabled": "0"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
Bundle params = new Bundle();
params.putString("name", "My campaign");
params.putString("objective", "OUTCOME_TRAFFIC");
params.putString("status", "PAUSED");
params.putString("special_ad_categories", "[]");
params.putString("is_adset_budget_sharing_enabled", "0");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/act_<AD_ACCOUNT_ID>/campaigns",
    params,
    HttpMethod.POST,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
NSDictionary *params = @{
  @"name": @"My campaign",
  @"objective": @"OUTCOME_TRAFFIC",
  @"status": @"PAUSED",
  @"special_ad_categories": @"[]",
  @"is_adset_budget_sharing_enabled": @"0",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]\
                               initWithGraphPath:@"/act_<AD_ACCOUNT_ID>/campaigns"\
                                      parameters:params\
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,\
                                      id result,\
                                      NSError *error) {\
    // Handle the result\
}];
curl -X POST \
  -F 'name="My campaign"' \
  -F 'objective="OUTCOME_TRAFFIC"' \
  -F 'status="PAUSED"' \
  -F 'special_ad_categories=[]' \
  -F 'is_adset_budget_sharing_enabled=0' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/campaigns

If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

ParameterDescription
adlabels<br>list<Object>Ad Labels associated with this campaign
bid_strategy<br>enum{LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS}Choose bid strategy for this campaign to suit your specific business goals.<br>Each strategy has tradeoffs and may be available for certain optimization_goals:<br>LOWEST_COST_WITHOUT_CAP: Designed to get the most results for your budget based on<br>your ad set optimization_goal without limiting your bid amount. This is the best strategy<br>if you care most about cost efficiency. However with this strategy it may be harder to get<br>stable average costs as you spend. This strategy is also known as automatic bidding.<br>Learn more in Ads Help Center, About bid strategies: Lowest cost.<br>LOWEST_COST_WITH_BID_CAP: Designed to get the most results for your budget based on<br>your ad set optimization_goal while limiting actual bid to your specified<br>amount. With a bid cap you have more control over your<br>cost per actual optimization event. However if you set a limit which is too low you may<br>get less ads delivery. If you select this, you must provide<br>a bid cap in the bid_amount field for each ad set in this ad campaign.<br>Note: during creation this is the default bid strategy if you don't specify.<br>This strategy is also known as manual maximum-cost bidding.<br>Learn more in Ads Help Center, About bid strategies: Lowest cost.<br>Notes:<br>- If you do not enable campaign budget optimization, you should set bid_strategy at ad set level.<br>- TARGET_COST bidding strategy has been deprecated with Marketing API v9.
budget_schedule_specs<br>list<JSON or object-like arrays>Initial high demand periods to be created with the campaign.<br>Provide list of time_start, time_end,budget_value, and budget_value_type.<br>For example,<br>-F 'budget_schedule_specs=[{<br>"time_start":1699081200,<br>"time_end":1699167600,<br>"budget_value":100,<br>"budget_value_type":"ABSOLUTE"<br>}]'<br>See High Demand Period for more details on each field.
id<br>int64
time_start<br>datetime
time_end<br>datetime
budget_value<br>int64
budget_value_type<br>enum{ABSOLUTE, MULTIPLIER}
recurrence_type<br>enum{ONE_TIME, WEEKLY}
weekly_schedule<br>list<JSON or object-like arrays>
days<br>list<int64>
minute_start<br>int64
minute_end<br>int64
timezone_type<br>string
buying_type<br>stringDefault value: AUCTION<br>This field will help Facebook make optimizations to delivery, pricing, and limits. All ad sets in this campaign must match the buying type. Possible values are: <br>AUCTION (default)<br>RESERVED (for reach and frequency ads).
campaign_optimization_type<br>enum{NONE, ICO_ONLY}campaign_optimization_type
daily_budget<br>int64Daily budget of this campaign. All adsets under this<br>campaign will share this budget. You can either set budget at the<br>campaign level or at the adset level, not both.
execution_options<br>list<enum{validate_only, include_recommendations}>Default value: Set<br>An execution setting<br>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. <br>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.<br>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.
is_skadnetwork_attribution<br>booleanTo create an iOS 14 campaign, enable SKAdNetwork attribution for this campaign.
is_using_l3_schedule<br>booleanis_using_l3_schedule
iterative_split_test_configs<br>list<Object>Array of Iterative Split Test Configs created under this campaign .
lifetime_budget<br>int64Lifetime budget of this campaign. All adsets under<br>this campaign will share this budget. You can either set budget at the<br>campaign level or at the adset level, not both.
name<br>stringName for this campaign<br>Supports Emoji
objective<br>enum{APP_INSTALLS, BRAND_AWARENESS, CONVERSIONS, EVENT_RESPONSES, LEAD_GENERATION, LINK_CLICKS, LOCAL_AWARENESS, MESSAGES, OFFER_CLAIMS, OUTCOME_APP_PROMOTION, OUTCOME_AWARENESS, OUTCOME_ENGAGEMENT, OUTCOME_LEADS, OUTCOME_SALES, OUTCOME_TRAFFIC, PAGE_LIKES, POST_ENGAGEMENT, PRODUCT_CATALOG_SALES, REACH, STORE_VISITS, VIDEO_VIEWS}Campaign's objective. If it is specified the API will validate that any ads created under the campaign match that objective. <br>Currently, with BRAND_AWARENESS objective, all creatives should be either only images or only videos, not mixed.<br>See Outcome Ad-Driven Experience Objective Validation for more information.
promoted_object<br>ObjectThe object this campaign is promoting across all its ads. It’s required for Meta iOS 14+ app promotion (SKAdNetwork or Aggregated Event Measurement) campaign creation. Only product_catalog_id is used at the ad set level.
application_id<br>intThe ID of a Facebook Application. Usually related to mobile or canvas games being promoted on Facebook for installs or engagement
pixel_id<br>numeric string or integerThe ID of a Facebook conversion pixel. Used with offsite conversion campaigns.
custom_event_type<br>enum{AD_IMPRESSION, RATE, TUTORIAL_COMPLETION, CONTACT, CUSTOMIZE_PRODUCT, DONATE, FIND_LOCATION, SCHEDULE, START_TRIAL, SUBMIT_APPLICATION, SUBSCRIBE, ADD_TO_CART, ADD_TO_WISHLIST, INITIATED_CHECKOUT, ADD_PAYMENT_INFO, PURCHASE, LEAD, COMPLETE_REGISTRATION, CONTENT_VIEW, SEARCH, SERVICE_BOOKING_REQUEST, MESSAGING_CONVERSATION_STARTED_7D, LEVEL_ACHIEVED, ACHIEVEMENT_UNLOCKED, SPENT_CREDITS, LISTING_INTERACTION, D2_RETENTION, D7_RETENTION, OTHER}The event from an App Event of a mobile app,<br>not in the standard event list.
object_store_url<br>URLThe 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.
object_store_urls<br>list<URL>The vec of 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<br>numeric string or integerThe ID of an Offer from a Facebook Page.
page_id<br>Page IDThe ID of a Facebook Page
product_catalog_id<br>numeric string or integerThe ID of a Product Catalog. Used with<br>Dynamic Product Ads.
product_item_id<br>numeric string or integerThe ID of the product item.
job_listing_id<br>numeric string or integerThe ID of the marketplace job listing.
instagram_profile_id<br>numeric string or integerThe ID of the instagram profile id.
instagram_actor_id<br>numeric string or integerThe ID of the L2-selected Instagram actor for UPV ads.
product_set_id<br>numeric string or integerThe ID of a Product Set within an Ad Set level Product<br>Catalog. Used with<br>Dynamic Product Ads.
event_id<br>numeric string or integerThe ID of a Facebook Event
offline_conversion_data_set_id<br>numeric string or integerThe ID of the offline dataset.
fundraiser_campaign_id<br>numeric string or integerThe ID of the fundraiser campaign.
custom_event_str<br>stringThe event from an App Event of a mobile app,<br>not in the standard event list.
mcme_conversion_id<br>numeric string or integerThe ID of a MCME conversion.
conversion_goal_id<br>numeric string or integerThe ID of a Conversion Goal.
offsite_conversion_event_id<br>numeric string or integerThe ID of a Offsite Conversion Event
boosted_product_set_id<br>numeric string or integerThe ID of the Boosted Product Set within an Ad Set level Product<br>Catalog. Should only be present when the advertiser has<br>opted into Product Set Boosting.
lead_ads_form_event_source_type<br>enum{inferred, meta_source, offsite_crm, offsite_web, onsite_crm, onsite_crm_single_event, onsite_clo_dep_aet, onsite_web, onsite_p2b_call, onsite_messaging, qualified_lead_file}The event source of lead ads form.
lead_ads_custom_event_type<br>enum{AD_IMPRESSION, RATE, TUTORIAL_COMPLETION, CONTACT, CUSTOMIZE_PRODUCT, DONATE, FIND_LOCATION, SCHEDULE, START_TRIAL, SUBMIT_APPLICATION, SUBSCRIBE, ADD_TO_CART, ADD_TO_WISHLIST, INITIATED_CHECKOUT, ADD_PAYMENT_INFO, PURCHASE, LEAD, COMPLETE_REGISTRATION, CONTENT_VIEW, SEARCH, SERVICE_BOOKING_REQUEST, MESSAGING_CONVERSATION_STARTED_7D, LEVEL_ACHIEVED, ACHIEVEMENT_UNLOCKED, SPENT_CREDITS, LISTING_INTERACTION, D2_RETENTION, D7_RETENTION, OTHER}The event from an App Event of a mobile app,<br>not in the standard event list.
lead_ads_custom_event_str<br>stringThe event from an App Event of a mobile app,<br>not in the standard event list.
lead_ads_offsite_conversion_type<br>enum{default, clo}The offsite conversion type for lead ads
value_semantic_type<br>enum {VALUE, MARGIN, LIFETIME_VALUE}The semantic of the event value to be using for optimization
variation<br>enum {OMNI_CHANNEL_SHOP_AUTOMATIC_DATA_COLLECTION, PRODUCT_SET_AND_APP, PRODUCT_SET_AND_IN_STORE, PRODUCT_SET_AND_OMNICHANNEL, PRODUCT_SET_AND_PHONE_CALL, PRODUCT_SET_AND_WEBSITE, PRODUCT_SET_AND_WEBSITE_AND_PHONE_CALL, PRODUCT_SET_WEBSITE_APP_AND_INSTORE}Variation of the promoted object for a PCA ad
passback_pixel_id<br>numeric string or integerID of the pixel used for tracking passback events
passback_application_id<br>numeric string or integerID of the application used for tracking passback events
product_set_optimization<br>enum{enabled, disabled}Enum defining whether or not the ad should be optimized for the promoted product set
full_funnel_objective<br>enum{OFFER_CLAIMS, PAGE_LIKES, EVENT_RESPONSES, POST_ENGAGEMENT, WEBSITE_CONVERSIONS, LINK_CLICKS, VIDEO_VIEWS, LOCAL_AWARENESS, PRODUCT_CATALOG_SALES, LEAD_GENERATION, BRAND_AWARENESS, STORE_VISITS, REACH, APP_INSTALLS, MESSAGES, OUTCOME_AWARENESS, OUTCOME_ENGAGEMENT, OUTCOME_LEADS, OUTCOME_SALES, OUTCOME_TRAFFIC, OUTCOME_APP_PROMOTION}Enum defining the full funnel objective of the campaign
dataset_split_id<br>numeric string or integerID of the dataset split used to perform additional optimization on the dataset
dataset_split_ids<br>array<numeric string>IDs of the dataset splits used to perform additional optimization on the dataset
lead_ads_selected_pixel_id<br>numeric string or integerThe selected pixel id for lead ads conversion leads optimization
custom_attribution_source_ids<br>array<numeric string>IDs of the custom attribution sources used for tracking passback events
multi_event_product<br>int64Identifies which action-to-action product the advertiser is using
product_sales_channel<br>enum {ONLINE, IN_STORE, OMNI}ProductSalesChannel of the promoted object for Omni L3 DA SBLI ads
anchor_event_config<br>JSON objectConfiguration for anchor event in multi-event optimization campaigns
multi_event_conversion_info<br>JSON objectConfiguration for multi-event conversion info in CLO campaigns
live_video_destination<br>stringThe live video destination type for live video ads
smart_pse_enabled<br>booleanWhether Smart Product Set Expansion is enabled for this campaign.
smart_pse_setting<br>enum{ENABLED, DISABLED}Setting for Smart Product Set Expansion. Uses an enum instead of a boolean to avoid TAO null handling issues.
lead_ads_follow_up_event<br>enum{whatsapp_conversations}The selected lead follow-up event for lead ads campaigns.
lead_ads_quality_volume_setting<br>enum{max_volume, more_volume, balanced, more_quality, max_quality}The quality-vs-volume preference setting for lead ads campaigns.
omnichannel_object<br>Object
app<br>array<JSON object>
pixel<br>array<JSON object>Required
onsite<br>array<JSON object>
whats_app_business_phone_number_id<br>numeric string or integer
whatsapp_phone_number<br>string
source_campaign_id<br>numeric string or integerUsed if a campaign has been copied. The ID from the original campaign that was copied.
special_ad_categories<br>array<enum {NONE, EMPLOYMENT, HOUSING, CREDIT, ISSUES_ELECTIONS_POLITICS, ONLINE_GAMBLING_AND_GAMING, FINANCIAL_PRODUCTS_SERVICES}>special_ad_categories<br>Required
special_ad_category_country<br>array<enum {AC, AD, AE, AF, AG, AI, AL, AM, AN, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW}>special_ad_category_country
spend_cap<br>int64A spend cap for the campaign, such that it will not spend more than this cap. Defined as integer value of subunit in your currency with a minimum value of $100 USD (or approximate local equivalent). Set the value to 922337203685478 to remove the spend cap. Not available for Reach and Frequency or Premium Self Serve campaigns
start_time<br>datetimestart_time
status<br>enum{ACTIVE, PAUSED, DELETED, ARCHIVED}Only ACTIVE and PAUSED are valid during<br>creation. Other statuses can be used for update. If it is set to<br>PAUSED, its active child objects will be paused and have an effective<br>status CAMPAIGN_PAUSED.
stop_time<br>datetimestop_time
topline_id<br>numeric string or integerTopline ID

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.

Struct {

id: numeric string,

success: bool,

}

Error Codes

ErrorDescription
100Invalid parameter
613Calls to this api have exceeded the rate limit.
200Permissions error
2635You are calling a deprecated version of the Ads API. Please update to the latest version.
190Invalid OAuth 2.0 Access Token
80004There 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.
300Edit failure

Updating

You can update a Campaign by making a POST request to /{campaign_id}.

Parameters

ParameterDescription
adlabels<br>list<Object>Ad Labels associated with this campaign
adset_bid_amounts<br>JSON object {numeric string : int64}A map of child adset IDs to their respective bid amounts required in the process of toggling campaign from autobid to manual bid
adset_budgets<br>array<JSON object>An array of maps containing all the non-deleted child adset IDs and either daily_budget or lifetime_budget, required in the process of toggling between campaign budget and adset budget
adset_id<br>numeric stringadset_id<br>Required
daily_budget<br>int64daily_budget
lifetime_budget<br>int64lifetime_budget
bid_strategy<br>enum{LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS}Choose bid strategy for this campaign to suit your specific business goals.<br>Each strategy has tradeoffs and may be available for certain optimization_goals:<br>LOWEST_COST_WITHOUT_CAP: Designed to get the most results for your budget based on<br>your ad set optimization_goal without limiting your bid amount. This is the best strategy<br>if you care most about cost efficiency. However with this strategy it may be harder to get<br>stable average costs as you spend. This strategy is also known as automatic bidding.<br>Learn more in Ads Help Center, About bid strategies: Lowest cost.<br>LOWEST_COST_WITH_BID_CAP: Designed to get the most results for your budget based on<br>your ad set optimization_goal while limiting actual bid to your specified<br>amount. With a bid cap you have more control over your<br>cost per actual optimization event. However if you set a limit which is too low you may<br>get less ads delivery. If you select this, you must provide<br>a bid cap in the bid_amount field for each ad set in this ad campaign.<br>Note: during creation this is the default bid strategy if you don't specify.<br>This strategy is also known as manual maximum-cost bidding.<br>Learn more in Ads Help Center, About bid strategies: Lowest cost.<br>COST_CAP: Designed to get the most results for your budget based on<br>your ad set optimization_goal while limiting actual average cost per optimization event to a specified amount.<br>Get specified cost cap in the bid_amount field for each ad set in this ad campaign.<br>Learn more in Ads Help Center, About bid strategies: Cost Cap.<br>Notes:<br>- If you do not enable campaign budget optimization, you should set bid_strategy at ad set level.<br>- TARGET_COST bidding strategy has been deprecated with Marketing API v9.
budget_rebalance_flag<br>booleanWhether to automatically rebalance budgets daily for all the adsets under this campaign.
campaign_optimization_type<br>enum{NONE, ICO_ONLY}campaign_optimization_type
daily_budget<br>int64Daily budget of this campaign. All adsets under this<br>campaign will share this budget. You can either set budget at the<br>campaign level or at the adset level, not both.
execution_options<br>list<enum{validate_only, include_recommendations}>Default value: Set<br>An execution setting<br>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. <br>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.<br>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.
is_adset_budget_sharing_enabled<br>booleanWhether the child ad sets are managed under ad set budget sharing. With ad set budget sharing, advertisers can now share up to 20% of their budget with other ad sets in the same campaign.
is_reels_trending_ads_enabled<br>booleanindicator for 'reels trending ads' campaign
is_skadnetwork_attribution<br>booleanFlag to indicate that the campaign will be using SKAdNetwork, which also means that it will only be targeting iOS 14.x and above
is_using_l3_schedule<br>booleanis_using_l3_schedule
iterative_split_test_configs<br>list<Object>Array of Iterative Split Test Configs created under this campaign .
lifetime_budget<br>int64Lifetime budget of this campaign. All adsets under<br>this campaign will share this budget. You can either set budget at the<br>campaign level or at the adset level, not both.
name<br>stringName for this campaign<br>Supports Emoji
objective<br>enum{APP_INSTALLS, BRAND_AWARENESS, CONVERSIONS, EVENT_RESPONSES, LEAD_GENERATION, LINK_CLICKS, LOCAL_AWARENESS, MESSAGES, OFFER_CLAIMS, OUTCOME_APP_PROMOTION, OUTCOME_AWARENESS, OUTCOME_ENGAGEMENT, OUTCOME_LEADS, OUTCOME_SALES, OUTCOME_TRAFFIC, PAGE_LIKES, POST_ENGAGEMENT, PRODUCT_CATALOG_SALES, REACH, STORE_VISITS, VIDEO_VIEWS}Campaign's objective. If it is specified the API will validate that any ads created under the campaign match that objective. <br>Currently, with BRAND_AWARENESS objective, all creatives should be either only images or only videos, not mixed.<br>See the Outcome Ad-Driven Experience Objective Validation section below for more information.
promoted_object<br>ObjectThe object this campaign is promoting across all its ads. Only product_catalog_id is used at the ad set level.
application_id<br>intThe ID of a Facebook Application. Usually related to mobile or canvas games being promoted on Facebook for installs or engagement
pixel_id<br>numeric string or integerThe ID of a Facebook conversion pixel. Used with offsite conversion campaigns.
custom_event_type<br>enum{AD_IMPRESSION, RATE, TUTORIAL_COMPLETION, CONTACT, CUSTOMIZE_PRODUCT, DONATE, FIND_LOCATION, SCHEDULE, START_TRIAL, SUBMIT_APPLICATION, SUBSCRIBE, ADD_TO_CART, ADD_TO_WISHLIST, INITIATED_CHECKOUT, ADD_PAYMENT_INFO, PURCHASE, LEAD, COMPLETE_REGISTRATION, CONTENT_VIEW, SEARCH, SERVICE_BOOKING_REQUEST, MESSAGING_CONVERSATION_STARTED_7D, LEVEL_ACHIEVED, ACHIEVEMENT_UNLOCKED, SPENT_CREDITS, LISTING_INTERACTION, D2_RETENTION, D7_RETENTION, OTHER}The event from an App Event of a mobile app,<br>not in the standard event list.
object_store_url<br>URLThe 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.
object_store_urls<br>list<URL>The vec of 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<br>numeric string or integerThe ID of an Offer from a Facebook Page.
page_id<br>Page IDThe ID of a Facebook Page
product_catalog_id<br>numeric string or integerThe ID of a Product Catalog. Used with<br>Dynamic Product Ads.
product_item_id<br>numeric string or integerThe ID of the product item.
job_listing_id<br>numeric string or integerThe ID of the marketplace job listing.
instagram_profile_id<br>numeric string or integerThe ID of the instagram profile id.
instagram_actor_id<br>numeric string or integerThe ID of the L2-selected Instagram actor for UPV ads.
product_set_id<br>numeric string or integerThe ID of a Product Set within an Ad Set level Product<br>Catalog. Used with<br>Dynamic Product Ads.
event_id<br>numeric string or integerThe ID of a Facebook Event
offline_conversion_data_set_id<br>numeric string or integerThe ID of the offline dataset.
fundraiser_campaign_id<br>numeric string or integerThe ID of the fundraiser campaign.
custom_event_str<br>stringThe event from an App Event of a mobile app,<br>not in the standard event list.
mcme_conversion_id<br>numeric string or integerThe ID of a MCME conversion.
conversion_goal_id<br>numeric string or integerThe ID of a Conversion Goal.
offsite_conversion_event_id<br>numeric string or integerThe ID of a Offsite Conversion Event
boosted_product_set_id<br>numeric string or integerThe ID of the Boosted Product Set within an Ad Set level Product<br>Catalog. Should only be present when the advertiser has<br>opted into Product Set Boosting.
lead_ads_form_event_source_type<br>enum{inferred, meta_source, offsite_crm, offsite_web, onsite_crm, onsite_crm_single_event, onsite_clo_dep_aet, onsite_web, onsite_p2b_call, onsite_messaging, qualified_lead_file}The event source of lead ads form.
lead_ads_custom_event_type<br>enum{AD_IMPRESSION, RATE, TUTORIAL_COMPLETION, CONTACT, CUSTOMIZE_PRODUCT, DONATE, FIND_LOCATION, SCHEDULE, START_TRIAL, SUBMIT_APPLICATION, SUBSCRIBE, ADD_TO_CART, ADD_TO_WISHLIST, INITIATED_CHECKOUT, ADD_PAYMENT_INFO, PURCHASE, LEAD, COMPLETE_REGISTRATION, CONTENT_VIEW, SEARCH, SERVICE_BOOKING_REQUEST, MESSAGING_CONVERSATION_STARTED_7D, LEVEL_ACHIEVED, ACHIEVEMENT_UNLOCKED, SPENT_CREDITS, LISTING_INTERACTION, D2_RETENTION, D7_RETENTION, OTHER}The event from an App Event of a mobile app,<br>not in the standard event list.
lead_ads_custom_event_str<br>stringThe event from an App Event of a mobile app,<br>not in the standard event list.
lead_ads_offsite_conversion_type<br>enum{default, clo}The offsite conversion type for lead ads
value_semantic_type<br>enum {VALUE, MARGIN, LIFETIME_VALUE}The semantic of the event value to be using for optimization
variation<br>enum {OMNI_CHANNEL_SHOP_AUTOMATIC_DATA_COLLECTION, PRODUCT_SET_AND_APP, PRODUCT_SET_AND_IN_STORE, PRODUCT_SET_AND_OMNICHANNEL, PRODUCT_SET_AND_PHONE_CALL, PRODUCT_SET_AND_WEBSITE, PRODUCT_SET_AND_WEBSITE_AND_PHONE_CALL, PRODUCT_SET_WEBSITE_APP_AND_INSTORE}Variation of the promoted object for a PCA ad
passback_pixel_id<br>numeric string or integerID of the pixel used for tracking passback events
passback_application_id<br>numeric string or integerID of the application used for tracking passback events
product_set_optimization<br>enum{enabled, disabled}Enum defining whether or not the ad should be optimized for the promoted product set
full_funnel_objective<br>enum{OFFER_CLAIMS, PAGE_LIKES, EVENT_RESPONSES, POST_ENGAGEMENT, WEBSITE_CONVERSIONS, LINK_CLICKS, VIDEO_VIEWS, LOCAL_AWARENESS, PRODUCT_CATALOG_SALES, LEAD_GENERATION, BRAND_AWARENESS, STORE_VISITS, REACH, APP_INSTALLS, MESSAGES, OUTCOME_AWARENESS, OUTCOME_ENGAGEMENT, OUTCOME_LEADS, OUTCOME_SALES, OUTCOME_TRAFFIC, OUTCOME_APP_PROMOTION}Enum defining the full funnel objective of the campaign
dataset_split_id<br>numeric string or integerID of the dataset split used to perform additional optimization on the dataset
dataset_split_ids<br>array<numeric string>IDs of the dataset splits used to perform additional optimization on the dataset
lead_ads_selected_pixel_id<br>numeric string or integerThe selected pixel id for lead ads conversion leads optimization
custom_attribution_source_ids<br>array<numeric string>IDs of the custom attribution sources used for tracking passback events
multi_event_product<br>int64Identifies which action-to-action product the advertiser is using
product_sales_channel<br>enum {ONLINE, IN_STORE, OMNI}ProductSalesChannel of the promoted object for Omni L3 DA SBLI ads
anchor_event_config<br>JSON objectConfiguration for anchor event in multi-event optimization campaigns
multi_event_conversion_info<br>JSON objectConfiguration for multi-event conversion info in CLO campaigns
live_video_destination<br>stringThe live video destination type for live video ads
smart_pse_enabled<br>booleanWhether Smart Product Set Expansion is enabled for this campaign.
smart_pse_setting<br>enum{ENABLED, DISABLED}Setting for Smart Product Set Expansion. Uses an enum instead of a boolean to avoid TAO null handling issues.
lead_ads_follow_up_event<br>enum{whatsapp_conversations}The selected lead follow-up event for lead ads campaigns.
lead_ads_quality_volume_setting<br>enum{max_volume, more_volume, balanced, more_quality, max_quality}The quality-vs-volume preference setting for lead ads campaigns.
omnichannel_object<br>Object
app<br>array<JSON object>
pixel<br>array<JSON object>Required
onsite<br>array<JSON object>
whats_app_business_phone_number_id<br>numeric string or integer
whatsapp_phone_number<br>string
smart_promotion_type<br>enum{GUIDED_CREATION, SMART_APP_PROMOTION}smart_promotion_type
special_ad_category<br>enum{NONE, EMPLOYMENT, HOUSING, CREDIT, ISSUES_ELECTIONS_POLITICS, ONLINE_GAMBLING_AND_GAMING, FINANCIAL_PRODUCTS_SERVICES}special_ad_category
special_ad_category_country<br>array<enum {AC, AD, AE, AF, AG, AI, AL, AM, AN, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW}>special_ad_category_country
spend_cap<br>int64A spend cap for the campaign, such that it will not spend more than this cap. Defined as integer value of subunit in your currency with a minimum value of $100 USD (or approximate local equivalent). Set the value to 922337203685478 to remove the spend cap. Not available for Reach and Frequency or Premium Self Serve campaigns
start_time<br>datetimestart_time
status<br>enum{ACTIVE, PAUSED, DELETED, ARCHIVED}Only ACTIVE and PAUSED are valid during<br>creation. Other statuses can be used for update. If it is set to<br>PAUSED, its active child objects will be paused and have an effective<br>status CAMPAIGN_PAUSED.
stop_time<br>datetimestop_time

Return Type

This endpoint supports read-after-write and will read the node to which you POSTed.

Struct {

success: bool,

}

Error Codes

ErrorDescription
100Invalid parameter
200Permissions error
613Calls to this api have exceeded the rate limit.
80004There 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.
2635You are calling a deprecated version of the Ads API. Please update to the latest version.
190Invalid OAuth 2.0 Access Token
801Invalid operation

Deleting

You can delete a Campaign by making a DELETE request to /{campaign_id}.

Parameters

This endpoint doesn't have any parameters.

Return Type

Struct {

success: bool,

}

Error Codes

ErrorDescription
200Permissions error
80004There 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.
100Invalid parameter
190Invalid OAuth 2.0 Access Token

You can dissociate a Campaign from an AdAccount by making a DELETE request to /act_{ad_account_id}/campaigns.

Parameters

ParameterDescription
before_date<br>datetimeSet a before date to delete campaigns before this date
delete_strategy<br>enum{DELETE_ANY, DELETE_OLDEST, DELETE_ARCHIVED_BEFORE}Delete strategy<br>Required
object_count<br>integerObject count

Return Type

Struct {

objects_left_to_delete_count: unsigned int32,

deleted_object_ids: List [

numeric string

],

}

Error Codes

ErrorDescription
100Invalid parameter

Objective Validation

These older objectives are deprecated with the release of Marketing API v17.0. Please refer to the Outcome-Driven Ads Experiences mapping table below to find the new objectives and their corresponding destination types, optimization goals and promoted objects.

Your campaign objective choice can limit the settings available to you.

Optimization Goals

Certain campaign objectives support only certain ad set optimization_goals. See Bidding Overview, Validation.

Compatible Ad Types

ObjectiveCompatible Ad Types
APP_INSTALLS- Image Ads<br>- Video Ads<br>- Carousel Ads<br>- Instant Experience Ads<br>- App Ads<br>- Instagram Ads (see placement limitations)<br>- Segment Asset Customization Ads<br>- Placement Asset Customization Ads<br>- Multi-Language Ads<br>- Dynamic Ads<br>- Dynamic Creative
BRAND_AWARENESS- Image Ads<br>- Video Ads<br>- Carousel Ads<br>- Instant Experience Ads<br>- Instagram Ads (see placement limitations)<br>- Segment Asset Customization Ads<br>- Placement Asset Customization Ads<br>- Multi-Language Ads<br>- Dynamic Creative
CONVERSIONS- Image Ads<br>- Video Ads<br>- Carousel Ads<br>- Instant Experience Ads<br>- Collection Ads<br>- App Ads<br>- Instagram Ads (see placement limitations)<br>- Ads that click to Messenger<br>- Offer Ads<br>- Segment Asset Customization Ads<br>- Placement Asset Customization Ads<br>- Multi-Language Ads<br>- Dynamic Ads<br>- Dynamic Creative
EVENT_RESPONSES- Image Ads<br>- Video Ads<br>- Carousel Ads<br>- Event and Local Ads
LEAD_GENERATION- Image Ads<br>- Video Ads<br>- Carousel Ads<br>- Lead Ads<br>- Instagram Ads (see placement limitations)<br>- Placement Asset Customization Ads<br>- Dynamic Creative
LINK_CLICKS- Image Ads<br>- Video Ads<br>- Carousel Ads<br>- Instant Experience Ads<br>- Collection Ads<br>- App Ads<br>- Instagram Ads (see placement limitations)<br>- Offer Ads<br>- Segment Asset Customization Ads<br>- Placement Asset Customization Ads<br>- Multi-Language Ads<br>- Dynamic Ads<br>- Dynamic Creative
MESSAGES- Image Ads<br>- Video Ads<br>- Carousel Ads<br>- Instagram Ads (see placement limitations)<br>- Messenger Ads
POST_ENGAGEMENT- Image Ads<br>- Carousel Ads<br>- Instant Experience Ads<br>- Instagram Ads (see placement limitations)
PRODUCT_CATALOG_SALES- Image Ads<br>- Carousel Ads<br>- Collection Ads<br>- Instagram Ads (see placement limitations)<br>- Dynamic Ads<br>- Collaborative Ads
REACH- Image Ads<br>- Video Ads<br>- Carousel Ads<br>- Instant Experience Ads<br>- Instagram Ads (see placement limitations)<br>- Segment Asset Customization Ads<br>- Placement Asset Customization Ads<br>- Multi-Language Ads<br>- Dynamic Creative
STORE_VISITS- Image Ads<br>- Carousel Ads<br>- Instant Experience Ads<br>- Collection Ads<br>- Instagram Ads (see placement limitations)<br>- Offer Ads
VIDEO_VIEWS- Video Ads<br>- Carousel Ads<br>- Instant Experience Ads<br>- Instagram Ads (see placement limitations)<br>- Segment Asset Customization Ads<br>- Placement Asset Customization Ads<br>- Multi-Language Ads<br>- Dynamic Creative

Objectives and Creative Fields

See our ads guide for a list of creatives supported per objective. In the API, the objective determines which ad creatives are valid.

ObjectiveCreative Fields
APP_INSTALLSobject_story_id or object_story_spec
CONVERSIONSobject_story_id or object_story_spec<br>Notes:<br>- If you are creating link ads not connected to a page, use the following creative fields: title, body, object_url, and image_file or image_hash.<br>- Creative cannot include link ads pointing to an app store.
EVENT_RESPONSESobject_story_id or object_story_spec
LEAD_GENERATIONobject_story_id or object_story_spec
LINK_CLICKSobject_story_id or object_story_spec<br>Notes:<br>- Creative cannot include link ads pointing to an app store.<br>- If you select LINK_CLICKS as both optimization goal and billing event, you must include call_to_action.
MESSAGESobject_story_spec
PAGE_LIKESobject_story_id, object_story_spec, object_id, and body
POST_ENGAGEMENTobject_story_id or object_story_spec<br>Note: Creative cannot include link ads pointing to an app store.
VIDEO_VIEWSobject_story_id or object_story_spec

Objectives and Tracking Specs

Tracking specs are applied by default based on the objective specified, please see the full list of defaults by objective here.

There are two important scenarios to take into account:

  • Tracking pixels are not applied by default, and you must specify it explicitly when your objective is CONVERSIONS.
  • Mobile app ads will no longer track installs or app events by default. You must explicitly specify to track installs or app events for mobile app ads otherwise your ad will not track.

To specify to track an install or app event, set the following in your ad:

text
tracking_specs=[{'action.type':['mobile_app_install'],'application':[{your_app_id}]},{'action.type':['app_custom_event'],'application':[{your_app_id}]}]

Objective and Promoted Objects

Certain objectives require the promoted_object to be set in ad sets. See Promoted Object for more information.

ObjectiveRequired promoted_object Fields
APP_INSTALLS- application_id and object_store_url<br>- If optimization_goal is OFFSITE_CONVERSIONS: application_id, object_store_url, and custom_event_type
CONVERSIONS- pixel_id (Conversion pixel ID)<br>- pixel_id (Facebook pixel ID) and custom_event_type<br>- pixel_id (Facebook pixel ID), pixel_rule, and custom_event_type<br>- event_id (Facebook event ID) and custom_event_type<br>- For mobile app events: application_id, object_store_url, and custom_event_type<br>- For offline conversions: offline_conversion_data_set_id (Offline dataset ID), and custom_event_type
LINK_CLICKSFor mobile app or Instant Experiences app engagement link clicks: application_id and object_store_url.
PRODUCT_CATALOG_SALES- product_set_id, or<br>- product_set_id and custom_event_type
PAGE_LIKESpage_id
OFFER_CLAIMSpage_id

Objective and Placements

Certain types of ad placements are valid only for specific objectives or creatives. See Business Help Center, Available ad placements for marketing objectives.

The table below shows some placements and their compatible objectives or creatives. You can pick a combination of those compatible placements. Note that:

  • With LEAD_GENERATION, device_platforms: desktop cannot be selected together with publisher_platforms: instagram.
  • If your objective is website traffic, story for facebook_positions does not support destination_type: messenger.
  • If your objective is website traffic, story for messenger_positions does not support destination_type: messenger.
  • If your objective is website traffic, ig_search and explore_home for instagram_positions do not support destination_type: whatsapp & messenger.
ObjectiveCreativePlacement
APP_INSTALLS, promoting an Instant Experiences appDesktop app adsdevice_platforms: desktop
APP_INSTALLS, promoting a mobile appPhoto or video mobile app adsdevice_platforms: mobile<br>publisher_platforms: facebook, feed, instagram, audience_network<br>facebook_positions: feed, video_feeds, instant articles and story<br>audience_network_positions: classic, rewarded_video<br>messenger_positions: story
BRAND_AWARENESSallpublisher_platforms: facebook, instagram, audience_network.<br>facebook_positions: feed, video_feeds, instream_video and story, which is currently under limited availability<br>instagram_positions: stream<br>audience_network_positions: classic, instream_video
CONVERSIONSPhoto or video link ads from a pageWe support BRAND_AWARENESS, APP_INSTALL, POST_ENGAGEMENT, VIDEO_VIEWS, REACH, WEBSITE_CONVERSIONS, and TRAFFIC.<br>Also supported: right_hand_column and story for facebook_positions and messenger_positions: messenger_home and story.<br>facebook_positions: story only supports the objective WEBSITE_CONVERSIONS<br>messenger_positions: story only supports the objective WEBSITE_CONVERSIONS<br>Exception: instream_video is not supported for this objective.
CONVERSIONSLink ads not connected to a pagefacebook_positions: right_hand_column
CONVERSIONS (promoting mobile app)Photo or video mobile app adsdevice_platforms: mobile.<br>facebook_positions: right_hand_column and story. story as a facebook_positions for this objective does not support destination_type: messenger.<br>messenger_positions: messenger_home<br>story as a messenger_positions for this objective does not support destination_type: messenger.
EVENT_RESPONSESEvent adsAs of 3.0, you cannot use right_hand_column for facebook_positions
EVENT_RESPONSESPage post adspublisher_platforms: facebook.<br>As of 3.0, you cannot use right_hand_column for facebook_positions
LEAD_GENERATIONPage post adsdevice_platforms: mobile, desktop<br>publisher_platforms: facebook, instagram<br>facebook_positions: feed and story, which is in limited availability<br>instagram_positions: stream<br>As of 3.0, you cannot use right_hand_column for facebook_positions
LINK_CLICKSPhoto or video link ads from a pageAll, including right_hand_column and messenger_positions: messenger_home and story.
LINK_CLICKSLink ads not connected to a pagefacebook_positions: right_hand_column
LINK_CLICKS, promoting an Instant Experiences appDesktop app adsdevice_platforms: desktop<br>facebook_positions: right_hand_column
LINK_CLICKS, promoting a mobile appPhoto or video mobile app adsdevice_platforms: mobile, facebook_positions: right_hand_column
PAGE_LIKESVideo creativespublisher_platforms: facebook<br>As of 3.0, you cannot use right_hand_column for facebook_positions
POST_ENGAGEMENTPage post ads with video or photopublisher_platforms: facebook, instagram<br>device_platforms: mobile, desktop<br>As of 3.0, you cannot use right_hand_column for facebook_positions
POST_ENGAGEMENTPage post ads with text onlypublisher_platforms: facebook, instagram<br>device_platforms: mobile, desktop<br>As of 3.0, you cannot use right_hand_column for facebook_positions
POST_ENGAGEMENTNew campaignpublisher_platforms: facebook, instagram<br>As of 3.0, you cannot use right_hand_column for facebook_positions
PRODUCT_CATALOG_SALESdynamic adsAll, including right_hand_column for facebook_positions.
REACHReach adsAll except right_hand_column for facebook_positions as of 3.0.<br>Includes messenger_positions: story and story for facebook_positions.
STORE_VISITSstore visit adspublisher_platforms: facebook<br>As of 3.0, you cannot use right_hand_column for facebook_positions
VIDEO_VIEWSVideo adspublisher_platforms: facebook, instagram, audience_network.<br>Includes story for facebook_positions but not with the optimation_goal set to TWO_SECOND_CONTINUOUS_VIDEO_VIEWS.<br>As of 3.0, you cannot use right_hand_column for facebook_positions

Objective, Optimization Goal and attribution_spec

Use click-through and view-through attribution windows for ad set to track conversions then use for ads delivery optimization. This is different from the attribution window you use for ads reporting. With attribution_spec, select a combination of click-through or view-through windows of 1 day or 7 days. The combinations you can use depend on your ad set's optimization_goal and campaign's objective.

Recommended Default attribution_spec

You may not have provided attribution_spec when you created ads sets optimized for Value Optimization. This is an optimization available for conversions, app installs, and product catalog sales objectives. In the past, we defaulted to a 1-day click through attribution window.

ObjectiveOptimization GoalAllowed Combination
CONVERSIONS, PRODUCT_CATALOG_SALESOFFSITE_CONVERSIONS1-day click<br>7-day click<br>1-day click and 1-day view<br>7-day click and 1-day view
APP_INSTALLS, LINK_CLICKSOFFSITE_CONVERSIONS1-day click<br>7-day click
APP_INSTALLSAPP_INSTALLS1-day click<br>1-day click and 1-day engaged-view<br>1-day click and 1-day view<br>1-day click and 1-day engaged-view and 1-day view
CONVERSIONSINCREMENTAL_OFFSITE_<br>CONVERSIONSNull click, Null view

For all other optimization_goal and objective combinations, you can only use 1-day click for attribution_spec.

Outcome-Driven Ads Experiences Objective Validation

From v20.0 onwards, Impressions optimization goal is deprecated for the legacy Post Engagement objective and the ON_POST destination_type.

Objective values

The following are newer objectives:

  • OUTCOME_APP_PROMOTION
  • OUTCOME_AWARENESS
  • OUTCOME_ENGAGEMENT
  • OUTCOME_LEADS
  • OUTCOME_SALES
  • OUTCOME_TRAFFIC

These newer objectives will eventually replace the original objectives APP_INSTALLS, BRAND_AWARENESS, CONVERSIONS, EVENT_RESPONSES, LEAD_GENERATION, LINK_CLICKS, LOCAL_AWARENESS, MESSAGES, OFFER_CLAIMS, PAGE_LIKES, POST_ENGAGEMENT, PRODUCT_CATALOG_SALES, REACH, STORE_VISITS, VIDEO_VIEWS. We will continue supporting these original objectives throughout 2022.

Limitations

  • Trying to duplicate existing objective campaigns to use the new objective values (OUTCOME_APP_PROMOTION, OUTCOME_AWARENESS, OUTCOME_ENGAGEMENT, OUTCOME_LEADS, OUTCOME_SALES, OUTCOME_TRAFFIC) may throw an error.

Example

Outcome-Driven Ads Experiences

!code<br>curl -X POST \ <br> -F 'name="New ODAX Campaign"' \ <br> -F 'objective="OUTCOME_ENGAGEMENT"' \ <br> -F 'status="PAUSED"' \ <br> -F 'special_ad_categories=[]' \ <br> -F 'access_token=ACCESS_TOKEN \ <br> https://graph.facebook.com/v11.0/<br> act_AD_ACCOUNT_ID/campaigns<br>

Legacy

!code<br>curl -X POST \<br> -F 'name="New Campaign"' \<br> -F 'objective="APP_INSTALLS"' \<br> -F 'status="PAUSED"' \<br> -F 'special_ad_categories=[]' \<br> -F 'access_token=ACCESS_TOKEN \<br> https://graph.facebook.com/v11.0/<br> act_AD_ACCOUNT_ID/campaigns<br>

Objective Mapping

Old ObjectiveNew ObjectiveDestination TypeOptimization GoalPromoted Object
BRAND_AWARENESSOUTCOME_AWARENESS,AD_RECALL_LIFTpage_id
REACHOUTCOME_AWARENESS,REACHpage_id
IMPRESSIONSpage_id
LINK_CLICKSOUTCOME_TRAFFIC,LINK_CLICKSapplication_id, object_store_url
LANDING_PAGE_VIEWS,
REACHapplication_id, object_store_url
IMPRESSIONS,
MESSENGERLINK_CLICKS,
REACH,
IMPRESSIONS,
WHATSAPPLINK_CLICKSpage_id
REACHpage_id
IMPRESSIONSpage_id
PHONE_CALLQUALITY_CALL,
LINK_CLICKS,
POST_ENGAGEMENTOUTCOME_ENGAGEMENTON_POSTPOST_ENGAGEMENT,
REACH,
IMPRESSIONS,
PAGE_LIKESOUTCOME_ENGAGEMENTON_PAGEPAGE_LIKESpage_id
EVENT_RESPONSESOUTCOME_ENGAGEMENTON_EVENTEVENT_RESPONSES,
POST_ENGAGEMENT,
REACH,
IMPRESSIONS,
APP_INSTALLOUTCOME_APP_PROMOTION,LINK_CLICKSapplication_id, object_store_url
OFFSITE_CONVERSIONSapplication_id, object_store_url
APP_INSTALLSapplication_id, object_store_url
VIDEO_VIEWSOUTCOME_AWARENESS,THRUPLAYpage_id
TWO_SECOND_CONTINUOUS_VIDEO_VIEWSpage_id
OUTCOME_ENGAGEMENTON_VIDEOTHRUPLAY,
TWO_SECOND_CONTINUOUS_VIDEO_VIEWS,
LEAD_GENERATIONOUTCOME_LEADSON_ADLEAD_GENERATIONpage_id
QUALITY_LEADpage_id
LEAD_FROM_MESSENGERLEAD_GENERATIONpage_id
LEAD_FROM_IG_DIRECTLEAD_GENERATIONpage_id
PHONE_CALLQUALITY_CALLpage_id
MESSAGESOUTCOME_ENGAGEMENTMESSENGERCONVERSATIONSpage_id
LINK_CLICKSpage_id
MESSENGERLEAD_GENERATIONpage_id
CONVERSIONS<br> (See Available conversion locations and events by objective in Meta Ads Manager for more information on available conversion events by objective.)OUTCOME_ENGAGEMENT,OFFSITE_CONVERSIONSpixel_id, custom_event_type
application_id, object_store_url
LINK_CLICKSpixel_id, custom_event_type
application_id, object_store_url
REACHpixel_id, custom_event_type
application_id, object_store_url
LANDING_PAGE_VIEWSpixel_id, custom_event_type
IMPRESSIONSpixel_id, custom_event_type
OUTCOME_LEADS,OFFSITE_CONVERSIONSpixel_id, custom_event_type
application_id, object_store_url
LINK_CLICKSpixel_id, custom_event_type
application_id, object_store_url
REACHpixel_id, custom_event_type
application_id, object_store_url
LANDING_PAGE_VIEWSpixel_id, custom_event_type
IMPRESSIONSpixel_id, custom_event_type
OUTCOME_SALES,OFFSITE_CONVERSIONSpixel_id, custom_event_type
application_id, object_store_url
MESSENGERCONVERSATIONSpage_id, pixel_id, custom_event_type
PHONE_CALLQUALITY_CALLpage_id
PRODUCT_CATALOG_SALESOUTCOME_SALESWEBSITELINK_CLICKSCampaign: product_catalog_id<br> Ad set: product_set_id, custom_event_type
STORE_VISITSOUTCOME_AWARENESS,REACHplace_page_set_id