synchronous_ad_review does not represent the final decision made during full review of your ad.
Issue, Electoral or Political Ads tab under Page Settings.
default_dsa_payor and default_dsa_beneficiary are set in an ad account, during the copying process, even if the original ad set does not set payor or beneficiary, it will be filled with saved default values. For more information on copying ads that target DSA regulated locations in the EU, see the Ad Copies reference documentation.curl -X POST \
-F 'name="My Ad"' \
-F 'adset_id="<AD_SET_ID>"' \
-F 'creative={
"creative_id": "<CREATIVE_ID>"
}' \
-F 'status="PAUSED"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/ads
authorization_category with the value POLITICAL . For example:
curl -X POST \
-F 'name="My AdGroup"' \
-F 'adset_id="<AD_SET_ID>"' \
-F 'creative={
"creative_id": "<CREATIVE_ID>"
}' \
-F 'status="PAUSED"' \
-F 'authorization_category="POLITICAL"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/ads
curl -X GET \
-d 'fields="id,name"' \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<AD_ID>/
use FacebookAds\Object\AdAccount;
use FacebookAds\Object\Fields\AdFields;
$account = new AdAccount($account_id);
$ads = $account->getAds(array(
AdFields::NAME,
));
// Outputs names of Ads.
foreach ($ads as $ad) {
echo $ad->name;
}
curl -X GET \
-d 'fields="name"' \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<AD_CAMPAIGN_ID>/ads
use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdSetFields;
$adset = new AdSet($adset_id);
$ads = $adset->getAds(array(
AdFields::NAME,
));
// Outputs names of Ads .
foreach ($ads as $ad) {
echo $ad->name;
}
GET /v25.0/<ADGROUP_ID>/?fields=id%2Cname HTTP/1.1 Host: graph.facebook.com
| Parameter | Description |
|---|---|
date_presetenum{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
|
review_feedback_breakdownboolean | Default value: false
review_feedback_breakdown
|
time_range{‘since’:YYYY-MM-DD,’until’:YYYY-MM-DD} |
Time Range. Note if time range is invalid, it will be ignored.
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.
Show child parameters |
| Field | Description |
|---|---|
idnumeric string |
id
default |
account_idnumeric string |
account_id
|
ad_active_timenumeric string |
ad_active_time
|
ad_review_feedback
| |
ad_schedule_end_timedatetime |
ad_schedule_end_time
|
ad_schedule_start_timedatetime |
ad_schedule_start_time
|
adlabels
| |
adset
| |
adset_idnumeric string |
adset_id
|
bid_amountint32 |
bid_amount
|
bid_infomap<string, unsigned int32> |
bid_info
|
bid_typeenum {CPC, CPM, MULTI_PREMIUM, ABSOLUTE_OCPM, CPA} |
bid_type
|
campaign
| |
campaign_idnumeric string |
campaign_id
|
configured_statusenum {ACTIVE, PAUSED, DELETED, ARCHIVED} |
configured_status
|
conversion_domainstring |
conversion_domain
|
conversion_specs
| |
created_timedatetime |
created_time
|
creative
| |
creative_asset_groups_spec
| |
demolink_hashstring |
demolink_hash
|
display_sequenceint32 |
display_sequence
|
effective_statusenum {ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO, CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED, IN_PROCESS, WITH_ISSUES} |
effective_status
|
engagement_audiencebool |
engagement_audience
|
failed_delivery_checks
| |
is_autobidbool |
is_autobid
|
issues_info
| |
last_updated_by_app_idid |
last_updated_by_app_id
|
namestring |
name
|
preview_shareable_linkstring |
preview_shareable_link
|
priorityunsigned int32 |
priority
|
recommendationslist<AdRecommendation> |
recommendations
|
source_ad
| |
source_ad_idnumeric string |
source_ad_id
|
special_ad_categorieslist<enum> |
special_ad_categories
|
statusenum {ACTIVE, PAUSED, DELETED, ARCHIVED} |
status
|
targetingTargeting |
targeting
|
tracking_and_conversion_with_defaultsTrackingAndConversionWithDefaults |
tracking_and_conversion_with_defaults
|
tracking_specs
| |
updated_timedatetime |
updated_time
|
| Edge | Description |
|---|---|
adcreativesEdge<AdCreative> |
adcreatives
|
adrules_governedEdge<AdRule> |
adrules_governed
|
copiesEdge<Adgroup> |
copies
|
insightsEdge<AdsInsights> |
insights
|
leadsEdge<UserLeadGenInfo> |
leads
|
previewsEdge<AdPreview> |
previews
|
targetingsentencelinesEdge<TargetingSentenceLine> |
targetingsentencelines
|
| Error Code | Description |
|---|---|
100 | Invalid parameter |
80004 | There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to /docs/graph-api/overview/rate-limiting#ads-management. |
613 | Calls to this api have exceeded the rate limit. |
190 | Invalid OAuth 2.0 Access Token |
104 | Incorrect signature |
2635 | You are calling a deprecated version of the Ads API. Please update to the latest version. |
2500 | Error parsing graph query |
3018 | The start date of the time range cannot be beyond 37 months from the current date |
200 | Permissions error |
270 | This Ads API request is not allowed for apps with development access level (Development access is by default for all apps, please request for upgrade). Make sure that the access token belongs to a user that is both admin of the app and admin of the ad account |
paused (see ad set). Run the ad set when you are ready.
curl -X POST \
-F 'name="My Ad"' \
-F 'adset_id="<AD_SET_ID>"' \
-F 'creative={
"creative_id": "<CREATIVE_ID>"
}' \
-F 'status="PAUSED"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/ads
HTTP POST to: https://graph.facebook.com/{API_VERSION}/act_{AD_ACCOUNT_ID}/asyncadrequestsets| Field | Description |
|---|---|
name type: string | Required. Name of ad set for newly created ads. |
ad_specs type: array of ad specs | Required. Ads can be created for different ad sets inside the current ad account. To use images in ad creative, provide image_hash in ad spec after you upload the image at https://graph.facebook.com/{API_VERSION}/act_{AD_ACCOUNT_ID}/adimages.image_file inside ad_specs. |
notification_uri type: string | Optional. Async job completed. This URI notifies the caller with a POST and ad set id. |
notification_mode type: string | Optional. Notification mode: OFF – No notificationON_COMPLETE – Send notification when all ads for set created. |
| Limit | Value |
|---|---|
Ads in regular ad account | 5000 non-deleted ads |
Ads in bulk ad account | 50000 non-deleted ads |
Ads in an ad set | 50 non-deleted ads |
Archived ads in an ad account | 100,000 archived ads |
curl -X POST \
-F 'name="My AdGroup with Redownload"' \
-F 'adset_id="<AD_SET_ID>"' \
-F 'creative={
"creative_id": "<CREATIVE_ID>"
}' \
-F 'redownload=1' \
-F 'status="PAUSED"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/ads
| Parameter | Description |
|---|---|
adset_idnumeric string or integer |
Single ID of an adset object to make the parent of the copy. Ignore if you want to keep the copy under the original adset parent.
|
creative_parametersAdCreative |
Creative inputs which will be used to construct the creative in the new ad. Overwrites happen at the top level. If no input is provided, the new ad will be created with an identical ad creative. If some input is provided, those parameters will be assigned to the ad creative created by this API call.
Accepts all ad creative parameters as specified in /documentation/ads-commerce/marketing-api/reference/ad-account/adcreatives
supports emoji |
rename_optionsJSON or object-like arrays |
Rename options
rename_strategy enum {DEEP_RENAME, ONLY_TOP_LEVEL_RENAME, NO_RENAME}Default value: ONLY_TOP_LEVEL_RENAMEDEEP_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 string
A prefix to copy names. Defaults to null if not provided.
rename_suffix string
A suffix to copy names. Defaults to null if not provided and appends a localized string of - Copy based on the ad account locale.
Show child parameters |
status_optionenum {ACTIVE, PAUSED, INHERITED_FROM_SOURCE} | Default value: PAUSEDACTIVE: the copied ad will have active status. PAUSED: the copied ad will have paused status. INHERITED_FROM_SOURCE: the copied ad will have the parent status.
|
Struct {
copied_ad_id: numeric string,
}
| Error Code | Description |
|---|---|
100 | Invalid parameter |
200 | Permissions error |
POST /v25.0/act_<AD_ACCOUNT_ID>/ads HTTP/1.1 Host: graph.facebook.com name=My+Ad&adset_id=%3CAD_SET_ID%3E&creative=%7B%22creative_id%22%3A%22%3CCREATIVE_ID%3E%22%7D&status=PAUSED
| Parameter | Description |
|---|---|
ad_schedule_end_timedatetime |
An optional parameter that defines the end time of an individual ad. If no end time is defined, the ad will run on the campaign’s schedule.
This parameter is only available for sales and app promotion campaigns.
|
ad_schedule_start_timedatetime |
An optional parameter that defines the start time of an individual ad. If no start time is defined, the ad will run on the campaign’s schedule.
This parameter is only available for sales and app promotion campaigns.
|
adlabelslist<Object> |
Ad labels associated with this ad
|
adset_idint64 |
The ID of the ad set, required on creation.
|
adset_specAd set spec |
The ad set spec for this ad. When the spec is provided, adset_id field is not required.
|
audience_idstring |
The ID of the audience.
|
bid_amountinteger | Deprecated. We no longer allow setting the bid_amount value on an ad. Please set bid_amount for the ad set.
|
conversion_domainstring |
The domain where conversions happen. Required to create or update an ad in a campaign that shares data with a pixel. This field will be auto-populated for existing ads by inferring from destination URLs . Note that this field should contain only the first and second level domains, and not the full URL. For example facebook.com.
|
creativeAdCreative |
This field is required for create. The ID or creative spec of the ad creative to be used by this ad. You can read more about creatives here. You may supply the ID within an object as follows: {"creative_id": <CREATIVE_ID>}or creative spec as follow: {"creative": {\"name\": \"<NAME>\", \"object_story_spec\": <SPEC>}}required supports emoji |
creative_asset_groups_specstring (CreativeAssetGroupsSpec) |
creative_asset_groups_spec
supports emoji |
date_formatstring |
The format of the date.
|
display_sequenceint64 |
The sequence of the ad within the same campaign
|
engagement_audienceboolean |
Flag to create a new audience based on users who engage with this ad
|
execution_optionslist<enum{validate_only, synchronous_ad_review, include_recommendations}> | Default value: 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.synchronous_ad_review: this option should not be used by itself. It should always be specified with validate_only. When these options are specified, the API call will perform Ads Integrity validations, which include message language checking, image 20% text rule, and so on, as well as the validation logics.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.
|
include_demolink_hashesboolean |
Include the demolink hashes.
|
namestring |
Name of the ad.
required supports emoji |
priorityint64 |
Priority
|
source_ad_idnumeric string or integer |
ID of the source Ad, if applicable.
|
statusenum{ACTIVE, PAUSED, DELETED, ARCHIVED} |
Only ACTIVE and PAUSED are valid during creation. Other statuses
can be used for update. When an ad is created, it will first go through
ad review, and will have the ad status PENDING_REVIEW before it
finishes review and reverts back to your selected status of ACTIVE
or PAUSED. During testing, it is recommended to set ads to a PAUSED
status so as to not incur accidental spend.
|
tracking_specsObject |
With Tracking Specs, you log actions taken by people on your ad. See Tracking and Conversion Specs.
|
Struct {
id: numeric string,
success: bool,
}
| Error Code | Description |
|---|---|
100 | Invalid parameter |
200 | Permissions error |
613 | Calls to this api have exceeded the rate limit. |
368 | The action attempted has been deemed abusive or is otherwise disallowed |
80004 | There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to /docs/graph-api/overview/rate-limiting#ads-management. |
194 | Missing at least one required parameter |
500 | Message contains banned content |
2635 | You are calling a deprecated version of the Ads API. Please update to the latest version. |
190 | Invalid OAuth 2.0 Access Token |
105 | The number of parameters exceeded the maximum for this operation |
curl -X POST \
-F 'name="My New Ad"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<AD_ID>/
adset_id and social_prefs can not be updated.
status = ARCHIVED have only two mutable fields: name and status. You can only change the latter to DELETED.
status = DELETED only can have name changed.
creative_sequence set cannot be changed to PAUSED, ARCHIVED, or DELETED.
OUTCOME_APP_PROMOTION, OUTCOME_AWARENESS, OUTCOME_ENGAGEMENT, OUTCOME_LEADS, OUTCOME_SALES, OUTCOME_TRAFFIC) may throw an error.
curl -X POST \
-F 'name="My New Ad"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<AD_ID>/
curl -X POST \
-F 'adgroup_status="PAUSED"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<AD_ID>/
curl -X POST \
-F 'adgroup_status="PAUSED"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<AD_ID>/
creative_sequence settings.
curl -X DELETE \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<AD_ID>/
DELETE /v25.0/<ADGROUP_ID>/ HTTP/1.1 Host: graph.facebook.com
Struct {
success: bool,
}
| Error Code | Description |
|---|---|
100 | Invalid parameter |
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 /docs/graph-api/overview/rate-limiting#ads-management. |
368 | The action attempted has been deemed abusive or is otherwise disallowed |