Marketing API Version

Ad Creative and Posts

Ad creative for Instagram are similar to those for Facebook, with a few exceptions:

Media

If you use images or videos that do not meet requirements below your ad will fail validation during ad creative creation.

Instagram Stream

We have a 2200 character limit on captions for ads targeting Instagram only and return an error if you try to create this ad. If an ad targets both Instagram and Facebook and is over this limit, your request to create an ad succeeds, however we will not deliver it on Instagram.

Image Requirements

Instagram's recommended aspect ratio for both image and video in Instagram stream is 1:1 which is different than Facebook's guidelines. Instagram stream also supports 1.91:1 landscape images and videos, as well as 4:5 portrait images and videos, and any aspect ratios in between.

  • If an image is wider than 1.91:1 and you provide no 100x100 crop spec, Instagram crops an ad to 1.91:1.
  • If an image is taller than 4:5 without a cropping spec, Instagram crops it to 4:5.
  • Video cannot be cropped should be between 1.91:1 and 4:5.
  • We recommend square images and videos, to utilize the maximum area on mobile devices.
  • Video is a Carousel ad format and has to be square, as we cannot crop video.

Some notes on cropping specs and behavior: - In link_data, for Instagram stream, if a 100x100 crop spec is provided, we will use that for Instagram ads. - For Facebook placements, if a 191x100 crop spec is provided, we will use it. - For Instagram, we require at least 600px width, while 640px or larger is recommended. - For Facebook, we require at least 600x315px, while 1200x628px or larger is recommended.

MediaInstagramInstagramFacebookFacebook

w/o 100x100 crop spec

with 100x100 crop spec

w/o 191x100 crop spec

with 191x100 crop spec

1:1 Image

At least 600x600 px.

After crop, at least 600x600px

Center crop of 1.91:1 will be performed automatically. After crop, at least 600x315px.

After crop, at least 600x315px.

4:5 Image

At least 600x750 px.

After crop, at least 600x600px

Center crop of 1.91:1 will be performed automatically. After crop, at least 600x315px.

After crop, at least 600x315px.

1.91:1 Image

At least 600x315 px.

After crop, at least 600x600px

At least 600px x 315px.

After crop, at least 600x315px.

Between 4:5 and 1.91:1 Image

At least 600 px width

After crop, at least 600x600px

Center crop of 1.91:1 will be performed automatically. After crop, at least 600x315px.

After crop, at least 600x315px.

Not between 4:5 and 1.91:1 Image

With object_story_spec, center crop to 1.91:1, if wider than this, or 4:5, if taller than this. After crop, the width needs to be at least 600px. With object_story_id referring an existing post, not valid.

After crop, at least 600x600px

Center crop of 1.91:1 will be performed automatically. After crop, at least 600x315px.

After crop, at least 600x315px.

If you run Dynamic Ads, product images specified in product feeds must be at least 600px or more in both width and height.

Usually we deliver the default image specified by image_url, but you can delivery additonal_image_urls if you set additional_image_index in the ad template creative. If a product has an image that is too small for Instagram you will not see any errors when you create ads, but this ad will not be delivered by Instagram Dynamic Ads.. To preview dynamic ads using the additional_image_index, you must pass the entire object_story_spec to the /generatepreviews endpoint. You cannot only pass object_story_id..

Video Requirements

To run a video ad in Instagram stream, provide a video with an aspect ratio between 1.91:1 to 4:5. The width of the video needs to be at least 600px. The length limit is between 3 and 60 seconds. It plays in an endless loop on Instagram but only once on Facebook.

video_data also requires a thumbnail image. That image must have the same aspect ratio as the video, with a width of at least 600px.

The video file size cannot be over 2.3GB. After uploaded to Facebook and compressed, it cannot be larger than an internal limit. To see whether video file works as an Instagram ad, you shouldupload it first, and to use this API call to check the is_instagram_eligible boolean value:

curl -G \
-d "access_token=<ACCESS_TOKEN>"\
-d "fields=is_instagram_eligible"\
"https://graph.facebook.com/<API_VERSION>/<VIDEO_ID>"

The response would be like this:

{
  "is_instagram_eligible": false,
  "id": "<VIDEO_ID>"
}

Instagram Stories

Images and videos for ads in Instagram Stories must be 9:16 or taller. If images are taller than 9:16, Instagram only shows the center section. If an image or video is shorter than 9:16, when you create ad creative, it fails. The minimum image or video resolution is 600x1067px.

You cannot use image crop specs with ads in Instagram Stories, so you cannot have a 1080x1080px image and use an image crop spec to get 600x1067px.

Video cannot be longer than 15 seconds less than the limit of 60 seconds for Instagram Stream.

Creative Platform Flexibility

You can create an ad set with "mixed placement" that runs on Facebook placements and Instagram Stream. All ad creatives used by ads in that set work on both platforms. Provide different image crop specs for the same image, with 100x100 or 191x100 for Instagram, and 191x100 for Facebook. Or you can use different images for Facebook and Instagram stream. Instagram Stories does not allow this.

Instagram ignores the image crop spec 191x100 in ad creative, but only takes it case you use platform_customizations.

Create the ad creative with the image you want to use on Facebook, including Facebook desktop, mobile, audience network, etc. Then provide a different image as the override for Instagram only, using a new platform_customizations parameter.

use FacebookAds\Object\AdCreative;
use FacebookAds\Object\ObjectStory\LinkData;
use FacebookAds\Object\Fields\ObjectStory\LinkDataFields;
use FacebookAds\Object\ObjectStorySpec;
use FacebookAds\Object\Fields\ObjectStorySpecFields;
use FacebookAds\Object\Fields\AdCreativeFields;

$link_data = new LinkData();
$link_data->setData(array(
LinkDataFields::MESSAGE => 'Great looking SXT handbags in store. #prettybag',
LinkDataFields::LINK => 'http://example.com',
LinkDataFields::IMAGE_HASH => '<IMAGE_HASH>',
LinkDataFields::CAPTION => 'www.example.com',
LinkDataFields::CALL_TO_ACTION => array(
  'type' => 'LEARN_MORE',
  'value' =>array(
    'link' => 'http://example.com',
  )
),
));

$object_story_spec = new ObjectStorySpec();
$object_story_spec->setData(array(
ObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
ObjectStorySpecFields::INSTAGRAM_ACTOR_ID => <IG_ACCOUNT_FBID>,
ObjectStorySpecFields::LINK_DATA => $link_data,
));

$platform_customizations = array(
  'instagram' => array(
    'image_url' => 'sample.com/ig-friendly-image.jpg', 
    'image_crops' => array(
      '100x100'=> array(array(200,90),array(900,790))
    ),
));

$creative = new AdCreative(null, 'act_<AD_ACCOUNT_ID>');

$creative->setData(array(
AdCreativeFields::NAME => 'Instagram only creative',
AdCreativeFields::OBJECT_STORY_SPEC => $object_story_spec,
'platform_customizations' => $platform_customizations,
));

$creative->create();
from facebookads.objects import AdCreative
from facebookads.specs import ObjectStorySpec, LinkData

link_data = LinkData()
link_data[LinkData.Field.message] = 'Great looking SXT handbags in store. #prettybag'
link_data[LinkData.Field.link] = 'http://example.com'
link_data[LinkData.Field.caption] = 'www.example.com'
link_data[LinkData.Field.image_hash] = '<IMAGE_HASH>'

call_to_action = {
  'type': 'LEARN_MORE',
}
call_to_action['value'] = {
  'link':'http://example.com',
}

link_data[LinkData.Field.call_to_action] = call_to_action

object_story_spec = ObjectStorySpec()
object_story_spec[ObjectStorySpec.Field.page_id] = <PAGE_ID>
object_story_spec[ObjectStorySpec.Field.instagram_actor_id] = <IG_ACCOUNT_FBID>
object_story_spec[ObjectStorySpec.Field.link_data] = link_data

platform_customizations = {
  'instagram': {
      'image_url': 'sample.com/ig-friendly-image.jpg',
      'image_crops': {'100x100':[[200,90],[900,790]],}
  }
}

creative = AdCreative(parent_id='act_<AD_ACCOUNT_ID>')
creative[AdCreative.Field.name] = 'Instagram only creative'
creative[AdCreative.Field.object_story_spec] = object_story_spec
creative['platform_customizations'] = platform_customizations
creative.remote_create()
curl \
-F 'name=Instagram only creative' \
-F 'object_story_spec={
   "page_id":<PAGE_ID>,
   "instagram_actor_id":<IG_ACCOUNT_FBID>,
   "link_data":{
       "call_to_action":{
           "type":"LEARN_MORE",
           "value":{
               "link":"http://example.com",
        }},
        "image_hash":"<IMAGE_HASH>",
        "link":"http://example.com",
        "message":"Great looking SXT handbags in store. #prettybag",
        "caption":"www.example.com",
        }}' \
-F 'platform_customizations={
   "instagram": {
        "image_url": "sample.com/ig-friendly-image.jpg", 
        "image_crops": {"100x100": [[0, 0],[800, 800]]}},
  }' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives

platform_customizations parameter may contain only one entry of instagram key. Using that, you can specify a different image using image_url or image_hash, and an optional image crop spec.

You can only use this to override images for Instagram ads. It cannot be used to override videos or text, or for Facebook ads. It can be used for both link_data and photo_data. It can also be used if the original image for Facebook is specified in a post referred by object_story_id, instead of included in the object_story_spec.

This feature does not work Dynamic Ads.

Page and Instagram account IDs

You need to supply the Instagram account's ID to create ad creative for Instagram. This ID is in Business Manager if the Instagram account is claimed by a business, or in the response to the Instagram account API queries after a Instagram account has been added to a business, connected to a Page, or created as a Page Backed Instagram Account (PBIA).

You also need provide the Facebook Page ID. Both of these IDs are required when you use Instagram only or mixed placements. If the Instagram account is connected to a Page, or is a PBIA, the same Page needs to be used.

You can specify the Instagram account id either as the instagram_actor_id field of creative during the creative creation, e.g. along with object_story_id or object_story_spec, or as the instagram_actor_id field of object_story_spec.

Posts as Instagram Ads

To create an Instagram Stream ad, use object_story_id to refer to an existing Facebook post, or create an object_story_spec in the ad creative directly. In the first case, you need Page and post related permissions to create posts. For the latter case you only need ad management permissions. To create ads in Instagram Stories, you must use object_story_spec.

If you choose the first approach, you may want to know whether a Facebook post can be used for Instagram Stream ads. To check this:

curl -G \
-d "access_token=<ACCESS_TOKEN>"\
-d "fields=is_instagram_eligible"\
"https://graph.facebook.com/<API_VERSION>/<POST_ID>"

The response would be like this:

{
  "is_instagram_eligible": false,
  "id": "<POST_ID>"
}

Data and Call To Action

Instagram Stream

The available creative types for each support objective. More creative types and objective combinations will be supported in the future.

LINK_DATA (Carousel or not)VIDEO_DATAPHOTO_DATA

LINK_CLICKS

VIDEO_VIEWS

MOBILE_APP_INSTALLS

CONVERSIONS

POST_ENGAGEMENT

MOBILE_APP_ENGAGEMENT

For a LINK_CLICKS or CONVERSIONS ads, you can provide a call_to_action (CTA) in the link_data or video_data field to define the action button below the ad.

  • If you use link_data, and if call_to_action is not specified, a default call_to_action appears. Its link value is from the link field of the link_data above, and the default CTA type is "LEARN_MORE".

  • If you define a call_to_action explicitly, link value must be the same as link value for link_data above. You can provide caption as the displayed URL.

  • If you use video_data, the call_to_action is required.

For a MOBILE_APP_INSTALLS or MOBILE_APP_ENGAGEMENT ads, the call_to_action field in the link_data or video_datais required. The links must point to an app's Apple App Store or Google Play URL. Deep linking is also supported. If link_data is used, the link in call_to_action must be the same as the link of the link_data above.

For a VIDEO_VIEWS ads, the description and video_data field is optional. Either the image_hash or image_url fields must be provided.

For a POST_ENGAGEMENT ads, if you use link_data, a CTA would be shown, either specified by you, or defaulted to LEARN_MORE. If you do not want a CTA, you can use photo_data instead.

message in link_data, description in video_data, and caption in photo_data for Instagram ad creative cannot be longer than 2200 characters. The caption field in link_data also displays as one-tap overlay. Other title and caption fields are only used by Facebook, not Instagram.

Any hyperlink contained in these message fields will not be active on Instagram. For a POST_ENGAGEMENT ad, if you specify a message with a hyperlink using photo_data, or video_data without CTA, a default CTA with type LEARN_MORE and a link from the message displays.

As a best practice, use #hashtags in the message of Instagram ads. No more than 30 hashtags can be used in each message.

use FacebookAds\Object\AdCreative;
use FacebookAds\Object\ObjectStory\LinkData;
use FacebookAds\Object\Fields\ObjectStory\LinkDataFields;
use FacebookAds\Object\ObjectStorySpec;
use FacebookAds\Object\Fields\ObjectStorySpecFields;
use FacebookAds\Object\Fields\AdCreativeFields;

$link_data = new LinkData();
$link_data->setData(array(
  LinkDataFields::IMAGE_CROPS => array(
    '100x100'=> array(array(200,90),array(900,790)), 
    '191x100'=> array(array(0,200),array(1146,800))
  );
  LinkDataFields::MESSAGE => 'Great looking SXT handbags in store. #prettybag',
  LinkDataFields::LINK => 'http://example.com',
  LinkDataFields::IMAGE_HASH => '<IMAGE_HASH>',
  LinkDataFields::CALL_TO_ACTION => array(
    'type' => 'LEARN_MORE',
    'value' =>array(
      'link' => 'http://example.com',
    )
  ),
));

$object_story_spec = new ObjectStorySpec();
$object_story_spec->setData(array(
  ObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
  ObjectStorySpecFields::INSTAGRAM_ACTOR_ID => <IG_ACCOUNT_FBID>,
  ObjectStorySpecFields::LINK_DATA => $link_data,
));

$creative = new AdCreative(null, 'act_<AD_ACCOUNT_ID>');

$creative->setData(array(
  AdCreativeFields::NAME => 'Instagram only creative',
  AdCreativeFields::OBJECT_STORY_SPEC => $object_story_spec,
));

$creative->create();
from facebookads.objects import AdCreative
from facebookads.specs import ObjectStorySpec, LinkData

link_data = LinkData()
link_data[LinkData.Field.message] = 'Great looking SXT handbags in store. #prettybag'
link_data[LinkData.Field.link] = 'http://example.com'
link_data[LinkData.Field.caption] = 'www.example.com'
link_data[LinkData.Field.image_hash] = '<IMAGE_HASH>'
link_data[LinkData.Field.image_crops] = {
    '100x100':[[200,90],[900,790]], 
    '191x100':[[0,200],[1146,800]]
}

call_to_action = {
    'type': 'LEARN_MORE',
}
call_to_action['value'] = {
    'link':'http://example.com',
}

link_data[LinkData.Field.call_to_action] = call_to_action

object_story_spec = ObjectStorySpec()
object_story_spec[ObjectStorySpec.Field.page_id] = <PAGE_ID>
object_story_spec[ObjectStorySpec.Field.instagram_actor_id] = <IG_ACCOUNT_FBID>
object_story_spec[ObjectStorySpec.Field.link_data] = link_data

creative = AdCreative(parent_id='act_<AD_ACCOUNT_ID>')
creative[AdCreative.Field.name] = 'Instagram only creative'
creative[AdCreative.Field.object_story_spec] = object_story_spec
creative.remote_create()
curl \
-F 'name=Instagram only creative' \
-F 'object_story_spec={
     "page_id":<PAGE_ID>,
     "instagram_actor_id":<IG_ACCOUNT_FBID>,
     "link_data":{
         "image_crops":{
              "100x100": [ [200,90], [900, 790] ], 
              "191x100": [ [0,200], [1146, 800] ],
         }
         "call_to_action":{
             "type":"LEARN_MORE",
             "value":{
                 "link":"http://example.com",
          }},
          "image_hash":"<IMAGE_HASH>",
          "link":"http://example.com",
          "message":"Great looking SXT handbags in store. #prettybag",
          "caption":"www.example.com",
          }}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives

Link Ads Image Overlay

Instagram link ads with objective set to LINK_CLICKS or CONVERSIONS show your Facebook Page name and "display url" on a one-tap image overlay. This appears when a user click on an ad's image. If a link ad uses video creative, this overlay does not display.

For MOBILE_APP_INSTALLS and MOBILE_APP_ENGAGEMENT ad ads, we show an advertisers Facebook Page name and “View in App Store” for iOS ads or “View in Play Store” for Android ads.

The "display url" for a link ad is the the link value in the link_data, unless you provide caption in the link_data. If the link is not user friendly, such as "http://tracking.com/redirect=client.com", you should set caption to client.com, which displays in the overlay instead of the link.

Instagram Stories

Ads creative for Instagram Stories only allow photo_data, video_data, and link_data. Among them photo_data can be used for only REACH objective, link_data can be used for only LINK_CLICKS objective, and video_data can be used for all the REACH, VIDEO_VIEWS, or LINK_CLICKS objective.

As branding ads (REACH and VIDEO_VIEWS) in Instagram Stories only show an advertiser's Instagram account name and profile picture, you cannot set all other visible fields, including message, title, link, caption, and so on. If link is specified in video_data, a CTA button will also be shown.

Direct response ads (LINK_CLICKS, CONVERSIONS, and APP_INSTALLS) shows a CTA button. You can specify the call_to_action of the link_data or video_data. If the call_to_action is not specified in link_data, Instagram will show a Learn More button with the link value of link_data. Certain CTA types are not supported, including Donate, Donate Now, Save, Call Now, and Get Directions. Other fields like message and title are still not used for Instagram Stories DR ads.

Clicking an ad in Instagram stories displays the next story, and clicking on the CTA button goes to the destination URL.

URL Tags for Tracking

You can track performance of an ad set with both Facebook and Instagram placements with breakdowns=placement from the Insights API. To track the ads with an external tool, use url_tags of ad creative to distinguish different placements. When you provide ad creative, you can use url_tags with "[SITE_SOURCE_NAME]" as the value of a key. For example:

...
$creative->setData(array(
  AdCreativeFields::URL_TAGS => 'source=[SITE_SOURCE_NAME]',
));

$creative->create();
...
creative[AdCreative.Field.url_tags] = 'source=[SITE_SOURCE_NAME]'
creative.remote_create()
curl \
...
-F 'url_tags=source=[SITE_SOURCE_NAME]' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives

In this example, url_tags is "source", but you can use any key you desire, but the macro "[SITE_SOURCE_NAME]" cannot be changed. For example, you can have "platform=[SITE_SOURCE_NAME]", but not "source=[PLATFORM_NAME]". For example, when the ad displays on Instagram, the link URL is appended to "source=ig". And if it displays on Facebook, it is "source=". **You also should not encode the value of [SITE_SOURCE_NAME].

With this you can set up your external tracking tool to distinguish ad clicks from different placements. The suggested logic is to check the value against your key, and default to Facebook if otherwise.

Related Topics

To create carousel ads, provide ad creative with multiple child_attachments in link_data for Instagram Stream. We require at least three for MOBILE_APP_INSTALLS or MOBILE_APP_ENGAGEMENT and two for other objectives. You need to provide instagram_actor_id, and only use objectives supported in Instagram Ads. You cannot use carousel ads with Instagram Stories.

Here are some differences between Facebook and Instagram carousel ads. These differences only happen with Instagram placement. If you have an ad set with both Facebook and Instagram placements enabled, what works on Facebook may be different from that on Instagram. For example, multi_share_optimized has no effect on Instagram, but works on Facebook.

  • multi_share_optimized has no effect on Instagram. If more than 5 attachments are provided, the first 5 will be used, based on the order of them in the ad creative creation.
  • multi_share_end_card has no effect on Instagram. End cards are not available on Instagram.
  • Each attachment must have link specified, which is the destination of the image click.
  • Each attachment has a Call To Action button. You can either specify it, or Instagram will default it to "Learn more" and link to the link setting of the attachment.
  • The caption field can be used to specify the display url in one-tap overlay. If not specified, the link url will be used.
  • Each carousel card has one image or video and a Call To Action button, and there is one message from message setting in the link_data. The name of each attachment is also shown, between the image or video and the message. The description fields of the link_data and of each child attachment are ignored.

For image cards:

  • Each attachment must have either picture or image_hash set. We do not default the image from link_data.
  • A 100x100 image crop can be provided for each attachment, or auto crop will be performed. The final image must be at least 600x600 pixels, which is significantly bigger than the minimum requirement of Facebook carousel ads.

For video cards:

  • The video needs to be square, with at least 600px at each dimension, at most 60 seconds.
  • A thumbnail image is required. We recommend to use thumbnail images with the same dimension as the videos, but do not require it.
  • The video is specified by video_id in a child_attachment. The thumbnail image is specified by image_hash or picture in a child_attachment.
  • The thumbnail image will be shown during loading, or when the ad is shown with a small visible portion. The video will be auto-started and looping.

You may have image cards and video cards mixed in one Carousel ad.

Dynamic Ads

To create a Dynamic Ad Template Creative for Dynamic Ads or Dynamic Ads for Travel, set template_data object of the object_story_spec.

Because each Instagram post is dynamically generated, you cannot get the instagram_permalink_url and instagram_story_id of the ad creative template. That means that you cannot get the likes and comments of your Dynamic ad posts on Instagram.

The default image specified by image_url of each product or other images in additonal_image_urls if additional_image_index is set in the ad template creative needs to have 600px or more on both width and height. If the image is not square, it will be cropped when displayed.

The name (with Carousel format only) and message of a template_data are shown under the product image. The description is not shown on Instagram, only on Facebook.

The call_to_action of a template_data is optional. If it is not provided, a "LEARN MORE" button will be created by default, with the URL of the product shown.

Post Moderation

Each ad creative with instagram_actor_id creates an Instagram Stream post for the Instagram account with that ID. Use the API to access that post, add new comments, check the comments by viewers, and delete certain comments. Posts and post-moderation are not available in Instagram stories which are not posts open to like or comment.

Ad creatives with instagram_actor_id has two fields called instagram_permalink_url and effective_instagram_story_id.

Features described below do not work with Dynamic Ads. instagram_permalink_url and effective_instagram_story_id in ad creative do not work with Template Creative for Dynamic Ads.

curl -G \
-d "access_token=<ACCESS_TOKEN>"\
-d "fields=instagram_permalink_url,effective_instagram_story_id"\
"https://graph.facebook.com/<API_VERSION>/<AD_CREATIVE_ID>"

With instagram_permalink_url, you can get a URL for a corresponding Instagram post and can see user interactions with the ad post. Because you see this post on a web site instead of a mobile Instagram app, it is not exactly what people viewing your ad see. It does not have "Sponsored" or CTA, nor it shows Carousel ads with multiple images.

With effective_instagram_story_id, send a GET HTTP request to get all the comments for a post:

curl -G \
-d "access_token=<ACCESS_TOKEN>"\
-d "fields=id,message,instagram_user"\
"https://graph.facebook.com/<API_VERSION>/<EFFECTIVE_INSTAGRAM_STORY_ID>/comments"

The response:

{
  "data": [
    {
      "id": "aWdfY29tbWVudDoxMTA1MjAx123wMTIxOTQxOTAxOjExMDUyMDEyMTQxNTYwODI4NTAZD",
      "message": "Where can I get it?"
      "instagram_user": {
        "id": "23333333333333"
      }
    }
    {
      "id": "aWdfY29tbWVudDoxMTA1MjAx123wMTIxOTQxOTAxOjExMjA1Mjc3ODM2MTEyNDAyNDQZD",
      "message": "This is nice.",
      "instagram_user": {
        "id": "33333333333333"
      }
    }
  ],
  "paging": {
    ...
  }
}


Get the user name of a commenter with the instagram_user/id returned. Fields for instagram_user are at Instagram Ad Account Setup.

The id is a long hash string, not a numeric string. Get the comment message or the user name with the comment id with this GET HTTP request:

curl -G \
-d "access_token=<ACCESS_TOKEN>"\
-d "fields=message,instagram_user"\
"https://graph.facebook.com/<API_VERSION>/<ID_HASH_STRING>"

To create a new comment or to delete an unwanted comment, send this POST HTTP or DELETE HTTP request with the required parameter ad_id and message(for create only). The id is the id of the ad which uses this ad creative. This means that these APIs can only be used to moderate ad post comments, not organic post comments on Instagram.

curl \
-F "access_token=<ACCESS_TOKEN>"\
-F "ad_id=<AD_ID>"\
-F "message=<COMMENT_MESSAGE>"\
"https://graph.facebook.com/<API_VERSION>/<EFFECTIVE_INSTAGRAM_STORY_ID>/comments"
curl -X DELETE -G \
-d "access_token=<ACCESS_TOKEN>"\
-d "ad_id=<AD_ID>"\
"https://graph.facebook.com/<API_VERSION>/<ID_HASH_STRING>"

The response is true if successful, or an error if otherwise. The first comment for each ad post cannot be deleted, since it is the ad caption you provided when you created the ad.