Log inStart Free Trial
easyCoexistence Official APIs

Instagram media container status: the codes and the lifecycle

Instagram's API publishes through media containers, and each one reports a status_code: IN_PROGRESS while it is still in the publishing process, FINISHED when it is ready, PUBLISHED once it is live, ERROR if it failed to complete and EXPIRED if 24 hours passed unpublished. Meta recommends checking once a minute, for no more than 5 minutes.

easyCoexistence runs the container cycle inside publish_instagram_post: it creates the container, waits for Instagram to finish and publishes, and while a video is still processing it finishes publishing on its own.

5

Values status_code can take: IN_PROGRESS, FINISHED, PUBLISHED, ERROR and EXPIRED.

24 hours

How long a container can wait unpublished before its status turns EXPIRED.

1 min

Meta's suggested interval between status checks, for no more than 5 minutes.

400

Containers an Instagram account can create in a rolling 24 hours.

2207027

Error subcode, under code 9007, for publishing a container that is not ready yet.

What is a media container?

The object a post is published from. POST /<IG_ID>/media creates one from an image or video URL, Meta fetches and prepares the media, and POST /<IG_ID>/media_publish with the container's ID as creation_id turns it into a post. A carousel adds a level: one container per item, then a CAROUSEL container that lists them as children.

What does each status code mean?

GET /<IG_CONTAINER_ID>?fields=status_code returns one of five values, each with its own next step:

  • IN_PROGRESS: the container is still in the publishing process; wait and check again.
  • FINISHED: the container and its media are ready; publish it.
  • PUBLISHED: the media is already live; there is nothing left to publish.
  • ERROR: the container failed to complete the publishing process; the status field holds an error subcode with the reason, and a new container is needed.
  • EXPIRED: it was not published within 24 hours; create a new one.
Checking a container's status
GET https://graph.instagram.com/<IG_CONTAINER_ID>?fields=status_code

{
  "status_code": "FINISHED",
  "id": "<IG_CONTAINER_ID>"
}

How often should the status be checked?

Once a minute, for no more than 5 minutes, is Meta's recommendation. Checking matters most for video, since Meta notes that video uploads are asynchronous: receiving a container ID does not guarantee the upload worked, and a status_code of FINISHED is what confirms it.

What happens if you publish too early?

media_publish fails with code 9007, subcode 2207027: the media is not ready for publishing. Nothing in the request needs fixing; check the status and publish once it reads FINISHED. Code 24 with subcode 2207008 is different, a container that does not exist or has expired, and Meta suggests retrying once or twice within 30 seconds to 2 minutes before creating a new container.

How long does a container last?

24 hours. A container that is not published within that time reads EXPIRED and can no longer be published, and code -2 with subcode 2207020, the media has expired, asks for a new container as well. An account can create 400 containers in a rolling 24 hours, which leaves room to create one again after a failure.

What else does a container report?

Two more fields, and a note from publishing. status holds an error subcode whenever status_code reads ERROR. copyright_check_status reports, for a video, whether Meta's copyright check has run and whether it found matches. After publishing, media_publish can return config_issue, CAPTION_NOT_ATTACHED or USER_TAGGING_FAILURE, when the post went live without its caption or its user tags.

Common mistakes

  • Treating a container ID as a finished upload. Video uploads are asynchronous, and only a status_code of FINISHED confirms the media is ready.
  • Publishing while the status reads IN_PROGRESS. The call fails with subcode 2207027 until it reads FINISHED.
  • Holding a container past a day. After 24 hours unpublished it reads EXPIRED, and only a new container can be published.
  • Reading only status_code on a failure. When it says ERROR, the status field carries the subcode that names the cause.
Doing this with EasyCoexistence

Claude, ChatGPT or your own code get back the published media ID, or a processing status while easyCoexistence completes it. 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

What does IN_PROGRESS mean on an Instagram container?

Meta is still preparing the media. Wait and check again, since publishing before the status reads FINISHED fails with code 9007.

How many media containers can an Instagram account create?

400 in a rolling 24 hours, which leaves room to create a container again after a failure.

What does config_issue mean after publishing?

media_publish succeeded, but the post went live without its caption, CAPTION_NOT_ATTACHED, or without its user tags, USER_TAGGING_FAILURE.

Why did my container end in ERROR?

It failed to complete the publishing process. Its status field holds an error subcode with the reason; fix that cause and create a new container.

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