This document shows you how to use the Marketing API to create Instagram reminder ads & ads with reminders.
Before you start, you need the following:
ads_management
permissionobjective: OUTCOME_ENGAGEMENT
& optimization_goal=REMINDERS_SET
objective: OUTCOME_ENGAGEMENT
& optimization_goal=THRUPLAY
objective: OUTCOME_AWARENESS
& optimization_goal=THRUPLAY
objective: OUTCOME_AWARENESS
& optimization_goal=REACH
objective: OUTCOME_SALES
& optimization_goal=OFFSITE_CONVERSIONS
Start by creating your ad campaign. To do this, 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
(Required)objective
(Required) — Note: Not all ad campaign objectives support reminder functionalityspecial_ad_categories
(Required)status
(Optional)Formatted for readability. Make sure to replace placeholders with your own values.
curl -X POST "https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/campaigns" \
-H "Content-Type: application/json" \
-d '{
"name":"My First Reminder Ads Campaign",
"objective":""OUTCOME_ENGAGEMENT"",
"special_ad_categories":""[]"",
}'
On success, your app receives the following JSON response with the created ad campaign's ID:
{ "id": "<AD_CAMPAIGN_ID>" }
Next, create your ad set. To do this, 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:
destination_type
(Required)optimization_goal
(Required) — Note: Not all Ad Set optimization goals support reminder functionalityinstagram_positions
(Optional) — Supported placements for reminder ads include stream
, story
, and reels
. For further information on specifying placement refer to Placement Targeting and Get Started: Placement for Instagram ads.Formatted for readability. Make sure to replace placeholders with your own values.
curl -X POST "https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/adsets" \
-F 'billing_event=IMPRESSIONS' \
-F 'campaign_id=<AD_CAMPAIGN_ID>' \
-F 'daily_budget=1000' \
-F 'destination_type=ON_REMINDER' \
-F 'name=Reminder Ads Ad Set' \
-F 'optimization_goal=REMINDERS_SET' \
-F 'targeting={
"geo_locations": { "countries":["US"] },
"device_platforms": ["mobile"]
}'
On success, your app receives the following JSON response with the created ad set's ID:
{ "id": "<AD_SET_ID>" }
The ad creative allows you to add assets to your ads. To create an ad creative, make 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:
asset_feed_spec
: This will contain the ID of the upcoming event you wish to associate with the ad.object_story_spec
: For reminder ads, the value of link must be specified. If you do not want to a link to appear on your ad, use the dummy URL https://fb.com/. The dummy link will not appear on your ad.Formatted for readability. Make sure to replace placeholders with your own values.
curl -X POST "https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/adcreatives" \
-F 'name=Sample ad creative' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"instagram_actor_id": "<INSTAGRAM_ACCOUNT_ID>",
"link_data": {
"call_to_action": {
"type": "LEARN_MORE"
},
"image_hash": "<IMAGE_HASH>",
"link": "https://fb.com/"
}
}' \
-F 'asset_feed_spec={
"upcoming_events": [
{
"event_id": <EVENT_ID>
"event_title": "Season Premiere",
"start_time": "2024-05-11T16:00:00+0000",
}
]
}' \
-F 'degrees_of_freedom_spec={
"creative_features_spec": {
"standard_enhancements": {
"action_metadata": {
"type": "DEFAULT"
},
"enroll_status": "OPT_OUT"
}
},
"degrees_of_freedom_type": "USER_ENROLLED_AUTOFLOW"
}' \
-F 'access_token=<ACCESS_TOKEN>'
On success, your app receives the following JSON response with the created ad creative's ID:
{ "id": "<AD_CREATIVE_ID>" }
Ads allow you to associate ad creative information with your ad sets. To create an ad, make 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 include:
name
: (Required)adset_id
: The ID of the ad set created earlier (Required)creative
: A JSON object with the ID of the creative created earlier (Required)status
: PAUSED
so you can review your ad before it starts running (Optional)Formatted for readability. Make sure to replace placeholders with your own values.
curl -X POST "https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/ads" \
-F 'name=Reminder Ad' \
-F 'adset_id=<AD_SET_ID> \
-F 'creative={
"creative_id": "<AD_CREATIVE_ID>"
}' \
-F 'status=PAUSED \
-F 'access_token=<ACCESS_TOKEN>'
On success, your app receives the following JSON response with the created ad's ID:
{ "id": "<AD_ID>" }