Editing or deleting Instagram posts through the API
Instagram's API deletes a published post, Reel, Story or whole carousel with DELETE /<IG_MEDIA_ID>, which Meta added on 3 December 2025 and offers with Facebook Login only. The one edit Meta documents is comment_enabled: POST /<IG_MEDIA_ID> with false or true turns a post's comments off or on, with Instagram Login or Facebook Login. Captions are changed in the Instagram app, since Meta documents no caption edit.
easyCoexistence publishes photos, carousels, Reels and Stories with publish_instagram_post from Claude, ChatGPT or your own code, and reads, answers and hides the comments on them; a live post itself, its caption, its comment setting or its deletion, is changed in the Instagram app.
The only update Meta documents for published Instagram media: turning its comments on or off.
When Meta added DELETE /<IG_MEDIA_ID> for posts, carousels, Reels and Stories, with instagram_manage_contents.
The only setup Meta's media reference lists for deleting Instagram media.
Error subcode for a media type the delete endpoint does not support, titled Media Type Not Supported.
How long content deleted in the Instagram app stays in Recently Deleted before it is deleted for good.
What can the API change on a published post?
One setting. Meta's IG Media reference documents a single update for published media: POST /<IG_MEDIA_ID> with comment_enabled, false to turn comments off and true to turn them back on. With Instagram Login it needs instagram_business_basic and instagram_business_manage_comments, and it does not apply to Live videos. A successful call returns success set to true.
POST https://graph.instagram.com/<IG_MEDIA_ID>
?comment_enabled=false
&access_token=<ACCESS_TOKEN>
{ "success": true }Can the API edit a caption?
Meta documents no way to. The caption is set on the media container before publishing, up to 2,200 characters and 20 @ tags, with up to 5 hashtags under Instagram's rule (Meta's API reference still lists 30), and the only update the media reference lists afterwards is comment_enabled. In the Instagram app, a caption is changed from the options menu above the post: Edit, then Done, as Instagram's Help Center describes.
Can the API delete a post?
With Facebook Login, yes. Since 3 December 2025, DELETE /<IG_MEDIA_ID> removes a post, a Reel, a Story or a whole carousel, using the instagram_manage_contents permission; ad posts are not covered, and a single item inside a carousel cannot be deleted on its own. Meta's reference states that the endpoint supports the Instagram API with Facebook Login only.
DELETE https://graph.facebook.com/<IG_MEDIA_ID>
?access_token=<ACCESS_TOKEN>
{ "success": true, "deleted_id": "<IG_MEDIA_ID>" }What does an unsupported delete return?
An OAuthException with code -1 and error subcode 2207073, titled Media Type Not Supported, for a media type the endpoint cannot delete. Items inside a carousel cannot be deleted one by one either: deleting the carousel's own media ID removes the whole post, the only way the API takes one of its photos down.
How do you change a post from Claude or ChatGPT?
Not through easyCoexistence's tools. Instagram's API changes only whether a post's comments are on, and no tool makes that call, so comments are turned off, captions edited and posts deleted in the Instagram app. What the tools do on a live post is work with its comments: list_social_comments reads them, reply_to_comment answers and hide_comment hides one.
What happens to a post deleted in the app?
Instagram moves it to Recently Deleted, where it can be restored for 30 days before it is deleted for good; Stories that are not in the archive go within 24 hours. Meta's CDN URLs for the media stop returning it once it is deleted, so a stored media_url is no backup of the file.
Common mistakes
- Publishing again to correct a caption. The second post is a duplicate that counts toward the account's 100 API-published posts a day; edit the first one in the app.
- Requesting instagram_manage_contents with Instagram Login. It belongs to the Facebook Login family, while Instagram Login uses the instagram_business_* permissions.
- Deleting one image of a carousel. The endpoint removes whole carousels only, so a single item cannot go without the rest.
- Sending comment_enabled to a Live video. Meta's update does not support Live media.
US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.
easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.
Frequently asked questions
Can I edit an Instagram caption through the API?
No. Meta documents no caption edit for published media, so change the caption in the Instagram app.
Can the Instagram API delete posts?
Yes, with Facebook Login: DELETE /<IG_MEDIA_ID> with instagram_manage_contents removes posts, Reels, Stories and whole carousels. Meta lists no delete for Instagram Login.
Can I turn off comments on a post through the API?
Yes. comment_enabled set to false on the post turns comments off, and true turns them back on, for posts other than Live videos.
Where does a deleted Instagram post go?
When it is deleted in the app, to Recently Deleted, where it can be restored for 30 days before Instagram removes it for good.
Keep reading
Connect your first channel in two minutes.
No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.
- 3 days free
- Cancel any time
- Official APIs only
- Monitored 24/7
Verified on