How do you publish a post to Instagram with the API?
Short answer
Create a container, then publish it. POST /<IG_ID>/media with an image_url or video_url returns a container ID, and POST /<IG_ID>/media_publish with that ID as creation_id posts it. It works only for Instagram professional accounts, fetches the media from a public URL, and allows 100 API-published posts in a moving 24 hours. There is no field for a publish time, so a scheduler has to hold the post itself.
What you need first
From Meta’s Content Publishing guide and its Instagram Platform overview, read on 11 October 2026:
- A professional account. The app’s users must have an Instagram professional account, which can be a business or a creator account.
- A login configuration. There are two, and the choice sets the host, the token and the permissions.
- An access level. Standard Access is the default and is enough if your app serves only your own account or accounts you manage. Advanced Access, needed for accounts you don’t own or manage, requires App Review and Business Verification.
- Media on a public server. Meta says it fetches the file with cURL, so the file must be on a publicly accessible server when you make the attempt.
- Page Publishing Authorization. If the Facebook Page connected to the account requires it, the API can’t publish until it is completed. Meta says there is no way for you to tell whether a Page requires it, and recommends advising users to complete it ahead.
| Setting | Instagram Login | Facebook Login |
|---|---|---|
| Facebook Page | Not required | Required |
| Token | Instagram User access token | Facebook User or Page access token |
| Host | graph.instagram.com | graph.facebook.com, and rupload.facebook.com for resumable video uploads |
| Publishing permissions | instagram_business_basic, instagram_business_content_publish | instagram_basic, instagram_content_publish, pages_read_engagement |
| Product tagging and partnership ads | Not supported | Supported |
If the account’s Page role came through a Business Manager, the Facebook Login route also needs ads_management and ads_read.
The three calls
- Create a container.
POST /<IG_ID>/mediawithimage_urlorvideo_url, acaption, andmedia_typeset toREELSorSTORIESwhere it applies. A carousel ismedia_type=CAROUSELwithchildren, up to 10 container IDs that were each created withis_carousel_item=true. The response is{"id": "<IG_CONTAINER_ID>"}. - Check the container.
GET /<IG_CONTAINER_ID>?fields=status_codereturnsEXPIRED,ERROR,FINISHED,IN_PROGRESSorPUBLISHED. Video uploads are asynchronous, so a container ID doesn’t mean the video arrived. Meta suggests asking once a minute, for no more than 5 minutes. - Publish.
POST /<IG_ID>/media_publishwithcreation_idset to the container ID. The response is the media ID.
A container that isn’t published within 24 hours expires. For a large video from an unreliable connection, upload_type=resumable returns a container and an upload address on rupload.facebook.com; the guide says that option is for apps that have implemented Facebook Login for Business.
The limits
From the guide and the IG User media reference:
| What | Limit |
|---|---|
| API-published posts | 100 in a 24-hour moving period; a carousel counts as one. GET /<IG_ID>/content_publishing_limit shows your usage |
| Containers created | 400 in a rolling 24 hours |
| Caption | 2,200 characters, 30 hashtags and 20 @ tags |
| Image | JPEG only, up to 8 MB, aspect ratio between 4:5 and 1.91:1, 320 to 1,440 pixels wide |
| Reel | MOV or MP4, H.264 or HEVC, AAC audio, 23 to 60 FPS, 3 seconds to 15 minutes, up to 300 MB; 9:16 recommended |
| Story | Image up to 8 MB, or video of 3 to 60 seconds and up to 100 MB; the story expires after 24 hours |
| Carousel | Up to 10 images or videos; a reel can’t be one of them |
The free video checker tests a reel’s length, size and shape against these limits in your browser, without uploading it. Stories can mention users, but publishing link, poll and location stickers isn’t supported. Filters aren’t supported either, and alt text is for image posts, not reels or stories.
Where Meta’s pages disagree
- 100 posts or 50. The rate-limit section of the guide says 100 API-published posts in 24 hours. The carousel section of the same page says accounts are limited to 50 published posts in 24 hours. Meta says carousels count as one post and recommends that your app enforce the limit itself.
- 30 hashtags or 5. The media reference allows 30 hashtags in a caption. Instagram’s Help Center says up to 5 on a post, and that a comment with more than 5 won’t post. We have not tested what the API does with a sixth. The hashtag limit answer has the detail.
- Shopping tags. The guide lists shopping tags as not supported. The media reference documents
product_tags, and the overview marks product tagging as supported on the Facebook Login route only.
What the API doesn’t do
The calls above have no field for a time: a post is published when you call media_publish. The guide itself says apps that let people schedule posts should enforce the publishing limit, which is how a scheduling tool works: it keeps the post and runs the three calls at the chosen time. Scheduling Instagram Reels covers Instagram’s own schedulers.
Publishing to Instagram with Mellow Hub
Hub reaches Instagram through its publishing provider, which holds the app approvals, so a person using Hub registers no Meta app and applies for no access level. A professional (Business or Creator) Instagram account. A personal account cannot publish through any API. A post takes a caption of up to 2,200 characters and 1 to 10 items. Stories take exactly one item. Reels take one video. Hub can connect an account through Instagram login or Facebook login, which are Meta’s two configurations above. It checks the caption and media against the network’s rules before anything is sent. The REST calls are in schedule social media posts with a REST API.
The first 3 posts are free, however many networks each one goes to, and need no card. After that Hub is paid: plans start at $19 a month (Solo), after a 7-day trial with a card on file that costs nothing if you cancel before it ends, and a monthly plan's first month is 20% off. Publishing is unlimited on every plan, under a fair-use ceiling that stops automated floods (900 publications a month on Solo), where one publication is one post on one account, so a post sent to five networks counts as five toward it. There are no automatic overage charges.
Questions people also ask
Can I publish to a personal Instagram account with the API?
No. Meta’s overview says the Instagram Platform serves professional accounts, meaning business and creator accounts.
Can the API publish a Reel or a Story?
Yes. Set media_type to REELS or STORIES when you create the container. A reel can be 3 seconds to 15 minutes and up to 300 MB. A story can’t carry link, poll or location stickers through the API.
Do I need to pass App Review to publish?
Not for your own account. Meta says Standard Access, the default, is all an app needs if it serves only your own professional account or accounts you manage. Advanced Access, with App Review and Business Verification, is for accounts you don’t own or manage.
Can I schedule a post with the Instagram API?
The publishing calls have no field for a time. A scheduler holds the post and publishes at the time, and Meta recommends that such an app enforce the 100-post limit itself.
Why is my video container IN_PROGRESS or ERROR?
Video uploads are asynchronous. Query the container’s status_code about once a minute for up to 5 minutes: IN_PROGRESS means still processing, FINISHED means ready to publish, and ERROR means it failed. A container that isn’t published within 24 hours becomes EXPIRED.
Can my media sit on a private server?
Not for the standard upload: Meta fetches image_url and video_url itself, so they must be publicly reachable at the time of the attempt. The resumable upload instead takes the file’s bytes or a public file_url.
Sources
- Meta for Developers: Instagram Platform, Content Publishing (updated 30 June 2026)
- Meta for Developers: Instagram Graph API, IG User media (updated 28 September 2026)
- Meta for Developers: Instagram Platform overview (professional accounts)
- Instagram Help Center: Use hashtags on Instagram
Other companies’ features change. Every statement about them rests on these pages, as they read on the date above.