When testing an API call, you can include the access_token parameter set to your access token. However, when making secure calls from your app, use the access token class.
Limitations
The target audience must be 18 years old or older
The phone number included in Call to Action must be from the same country as the target audience
Step 1: Create a Campaign
To create your ad campaign send a POST request to the act_ad_account_id/campaigns endpoint where ad_account_id is the ID for your Meta ad account. Your request must include:
name
objective – set to one of the following supported objectives:
OUTCOME_AWARENESS
OUTCOME_ENGAGEMENT
OUTCOME_LEADS
OUTCOME_SALES
OUTCOME_TRAFFIC
special_ad_categories
Example Request
Formatted for readability. Replace bold, italics values, such as ad_account_id, with your values.
On success your app receives a JSON response with the ID for your campaign.
{
"id": "campaign_id"
}
Step 2: Create an Ad Set
To create an ad set, send a POST request to the act_ad_account_id/adsets endpoint where ad_account_id is the ID for your Meta ad account. Your request must include:
bid_amount
billing_event set to IMPRESSIONS
campaign_id
daily_budget
destination_type set to PHONE_CALL
name
optimization_goal set to QUALITY_CALL for call ads
targeting
Example Request
Formatted for readability. Replace bold, italics values, such as ad_account_id, with your values.
On success your app receives the following JSON response with the ID for the ad set.
{
"id": "adset_id"
}
Step 3: Create Ad Creative
The ad creative allows you to add assets to your ads. Carousel, image, text-only, and video ads are supported.
To create an ad creative, send a POST request to the /act_ad_account_id/adcreatives endpoint where ad_account_id is the ID for your Meta ad account. Your request must include:
name
object_story_spec
object_story_spec with a link_data object that defines the call_to_action with type set to CALL_NOW and value as the phone number for your business
Image Ad Example Request
Formatted for readability. Replace bold, italics values, such as page_access_token, with your values.
On success your app receives the following JSON response with the ID for the ad creative.
{
"id": "ad_creative_id"
}
Step 4: Create the Ad
To create the ad you need to associate the ad creative and the ad set. To create the ad, send a POST request to the /act_ad_account_id/ads endpoint where ad_account_id is the ID for your Meta ad account. Your request must included: