Skip to main content
Server path: /meta-ads-manager | Type: Application | PCID required: Yes

Tools


meta_ads_manager_create_ad

Create ad Parameters:
ParameterTypeRequiredDefaultDescription
ad_account_idstringYesID of the ad account.
namestringYesName of the ad.
adset_idstringYesThe ID of the ad set to associate with this ad.
creativestringYesAd creative spec as JSON string, e.g. {“creative_id”:“<CREATIVE_ID>”} or inline creative spec.
statusstringNoAd status. Only ACTIVE and PAUSED are valid during creation.
bid_amountintegerNoBid amount in account currency subunits. Overrides the ad set bid_amount.
tracking_specsstringNoTracking specs as JSON string for logging actions taken on your ad.
conversion_domainstringNoDomain where conversions happen. Required for campaigns that share data with a pixel.

meta_ads_manager_create_ad_set

Create ad set Parameters:
ParameterTypeRequiredDefaultDescription
ad_account_idstringYesID of the ad account.
namestringYesAd set name, max length of 400 characters.
campaign_idstringYesThe campaign ID to add this ad set to.
billing_eventstringYesThe billing event for this ad set.
optimization_goalstringNoWhat the ad set is optimizing for.
bid_amountintegerNoBid cap or target cost for this ad set in account currency subunits.
bid_strategystringNoBid strategy for this ad set.
daily_budgetintegerNoDaily budget in account currency subunits.
lifetime_budgetintegerNoLifetime budget in account currency subunits.
start_timestringNoStart time of the ad set (ISO 8601 format).
end_timestringNoEnd time of the ad set (ISO 8601 format). Required when lifetime_budget is specified.
targetingstringNoTargeting spec as JSON string. Must include geo_locations with countries array, e.g. {“geo_locations”:{“countries”:[“US”]}}.
statusstringNoAd set status. Only ACTIVE and PAUSED are valid during creation.
destination_typestringNoWhere people are sent when they click.

meta_ads_manager_create_campaign

Create campaign Parameters:
ParameterTypeRequiredDefaultDescription
ad_account_idstringYesID of the ad account.
namestringYesName for this campaign.
objectivestringYesCampaign objective.
statusstringNoCampaign status. Only ACTIVE and PAUSED are valid during creation.
special_ad_categoriesstringYesSpecial ad categories. Required for all campaigns. Pass as JSON array string, e.g. [“NONE”]. Valid values: NONE, EMPLOYMENT, HOUSING, CREDIT, ISSUES_ELECTIONS_POLITICS, ONLINE_GAMBLING_AND_GAMING.
buying_typestringNoBuying type: AUCTION (default) or RESERVED (for reach and frequency).
bid_strategystringNoBid strategy for this campaign.
daily_budgetintegerNoDaily budget in account currency subunits (e.g. cents).
lifetime_budgetintegerNoLifetime budget in account currency subunits.
spend_capintegerNoSpend cap in account currency subunits (minimum $100 USD equivalent).
start_timestringNoCampaign start time (ISO 8601 format).
stop_timestringNoCampaign stop time (ISO 8601 format).

meta_ads_manager_delete_ad

Delete ad Parameters:
ParameterTypeRequiredDefaultDescription
ad_idstringYesID of the ad.

meta_ads_manager_delete_ad_set

Delete ad set Parameters:
ParameterTypeRequiredDefaultDescription
ad_set_idstringYesID of the ad set.

meta_ads_manager_delete_campaign

Delete campaign Parameters:
ParameterTypeRequiredDefaultDescription
campaign_idstringYesID of the campaign.

meta_ads_manager_dissociate_campaigns

Dissociate campaigns Parameters:
ParameterTypeRequiredDefaultDescription
ad_account_idstringYesID of the ad account.
delete_strategystringYesDelete strategy to use.
before_datestringNoDelete campaigns before this date (used with DELETE_ARCHIVED_BEFORE strategy).
object_countintegerNoNumber of objects to delete.

meta_ads_manager_get_account_insights

Get account insights Parameters:
ParameterTypeRequiredDefaultDescription
ad_account_idstringYesID of the ad account.
date_presetstringNoPredefined date range for insights.
time_rangeobjectNoCustom date range for insights.
time_incrementstringNoHow to break down results by time: 1 for daily, 7 for weekly, monthly, or all_days.
fieldsstringYesComma-separated metrics to return (e.g. impressions,clicks,spend,cpc,cpm,ctr,reach,frequency). Pass as comma-separated string.
levelstringNoLevel of aggregation for results.
breakdownsstringNoHow to break down results (e.g. age,gender,country,placement). Pass as comma-separated string.
filteringstringNoFilters for the report as JSON array, e.g. [{“field”:“campaign.id”,“operator”:“IN”,“value”:[“123”]}].
limitintegerNoMaximum number of results to return.

meta_ads_manager_get_ad

Get ad Parameters:
ParameterTypeRequiredDefaultDescription
ad_idstringYesID of the ad.
date_presetstringNoPredefined date range used to aggregate insights metrics.
time_rangeobjectNoDate range used to aggregate insights metrics.
fieldsstringNoComma-separated list of fields to return. Pass as comma-separated string.

meta_ads_manager_get_ad_set

Get ad set Parameters:
ParameterTypeRequiredDefaultDescription
ad_set_idstringYesID of the ad set.
date_presetstringNoPredefined date range used to aggregate insights metrics.
time_rangeobjectNoTime range for insights aggregation.
fieldsstringNoComma-separated list of fields to return. Pass as comma-separated string.

meta_ads_manager_get_campaign

Get campaign Parameters:
ParameterTypeRequiredDefaultDescription
campaign_idstringYesID of the campaign.
fieldsstringNoComma-separated list of fields to return. Pass as comma-separated string.

meta_ads_manager_get_campaign_insights

Get campaign insights Parameters:
ParameterTypeRequiredDefaultDescription
campaign_idstringYesID of the campaign.
date_presetstringNoPredefined date range for insights.
time_rangeobjectNoCustom date range for insights.
time_incrementstringNoHow to break down results by time.
fieldsstringYesComma-separated metrics to return. Pass as comma-separated string.
breakdownsstringNoHow to break down results. Pass as comma-separated string.
limitintegerNoMaximum number of results to return.

meta_ads_manager_list_ad_sets

List ad sets Parameters:
ParameterTypeRequiredDefaultDescription
ad_account_idstringYesID of the ad account.
date_presetstringNoPredefined date range used to aggregate insights metrics.
time_rangeobjectNoTime range for insights aggregation.
fieldsstringNoComma-separated list of fields to return. Pass as comma-separated string.

meta_ads_manager_list_ads

List ads Parameters:
ParameterTypeRequiredDefaultDescription
ad_account_idstringYesID of the ad account.
date_presetstringNoPredefined date range used to aggregate insights metrics.
effective_statusstringNoFilter ads by effective status. Pass as JSON array string, e.g. [“ACTIVE”]. Valid values: ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO, CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED, IN_PROCESS, WITH_ISSUES.
time_rangeobjectNoDate range used to aggregate insights metrics.
updated_sinceintegerNoFilter to ads updated since this Unix timestamp.
fieldsstringNoComma-separated list of fields to return. Pass as comma-separated string.
summarystringNoAggregated information about the edge, such as counts. Pass as JSON array string, e.g. [“insights”]. Valid values: insights, total_count.

meta_ads_manager_list_campaigns

List campaigns Parameters:
ParameterTypeRequiredDefaultDescription
ad_account_idstringYesID of the ad account.
date_presetstringNoPredefined date range used to aggregate insights metrics.
effective_statusstringNoFilter campaigns by effective status. Pass as JSON array string, e.g. [“ACTIVE”]. Valid values: ACTIVE, PAUSED, DELETED, PENDING_REVIEW, DISAPPROVED, PREAPPROVED, PENDING_BILLING_INFO, CAMPAIGN_PAUSED, ARCHIVED, ADSET_PAUSED, IN_PROCESS, WITH_ISSUES.
is_completedbooleanNoIf true, return completed campaigns.
time_rangeobjectNoDate range used to aggregate insights metrics.
fieldsstringNoComma-separated list of fields to return (e.g. name,id,status,objective,daily_budget,lifetime_budget). Pass as comma-separated string.
summarystringNoAggregated information about the edge, such as counts. Pass as JSON array string, e.g. [“insights”]. Valid values: insights, total_count.

meta_ads_manager_update_ad

Update ad Parameters:
ParameterTypeRequiredDefaultDescription
ad_idstringYesID of the ad.
namestringNoName of the ad.
statusstringNoAd status.
bid_amountintegerNoBid amount in account currency subunits.
creativestringNoAd creative spec as JSON string.
tracking_specsstringNoTracking specs as JSON string.
conversion_domainstringNoDomain where conversions happen.

meta_ads_manager_update_ad_set

Update ad set Parameters:
ParameterTypeRequiredDefaultDescription
ad_set_idstringYesID of the ad set.
namestringNoAd set name.
statusstringNoAd set status.
daily_budgetintegerNoDaily budget in account currency subunits.
lifetime_budgetintegerNoLifetime budget in account currency subunits.
bid_amountintegerNoBid cap or target cost in account currency subunits.
bid_strategystringNoBid strategy for this ad set.
end_timestringNoEnd time (ISO 8601 format).
targetingstringNoTargeting spec as JSON string.
optimization_goalstringNoWhat the ad set is optimizing for.

meta_ads_manager_update_campaign

Update campaign Parameters:
ParameterTypeRequiredDefaultDescription
campaign_idstringYesID of the campaign.
namestringNoName for this campaign.
statusstringNoCampaign status.
daily_budgetintegerNoDaily budget in account currency subunits.
lifetime_budgetintegerNoLifetime budget in account currency subunits.
bid_strategystringNoBid strategy for this campaign.
spend_capintegerNoSpend cap in account currency subunits.
start_timestringNoCampaign start time.
stop_timestringNoCampaign stop time.
special_ad_categoriesstringNoSpecial ad categories. Pass as JSON array string, e.g. [“NONE”]. Valid values: NONE, EMPLOYMENT, HOUSING, CREDIT, ISSUES_ELECTIONS_POLITICS, ONLINE_GAMBLING_AND_GAMING.