Skip to main content
Use the OpenPMM API to prepare and publish a Post to an Instagram Destination. This guide shows the Instagram-specific choices. Read Create posts first for the complete Post workflow.
Publishing creates content on Instagram. Review the Destination, content, media, and timing before you send a confirmed request.

Before you start

You need these objects:
  • An API credential with access to the Workspace.
  • A Workspace ID.
  • A connected Instagram Destination ID.
  • Media Assets for the Post, Reel, or Story.
Use Connect a destination to authorize the Instagram account. Use Upload assets when you need to add media.

Choose the Instagram content type

Instagram requires media for every Post. Set placement in destination_options.instagram: Use post for a single image or carousel. Use reel for one video. Use story for one temporary profile Story. The Instagram media guidelines page lists the current file, aspect ratio, and duration limits.

Create an Instagram draft

Create a draft with the Instagram channel. Set the Instagram placement in destination_options.
Send the request to POST /workspaces/{workspace_id}/posts. Store the returned Post id and version.

Prepare Instagram media

Upload each file as an Asset before publication. Add the Asset IDs to the Post body in the order that you want Instagram to display them. OpenPMM applies these product limits:
  • Image files use JPEG format and have an 8 MB maximum.
  • A carousel accepts one to 10 images.
  • A Reel accepts one MP4 or MOV video.
  • An Instagram video can be up to 500 MiB.
  • A Reel video can be 3 seconds to 15 minutes long.
  • An image Post uses a 4:5 to 1.91:1 aspect ratio.
OpenPMM converts PNG and WebP images to JPEG when safe. It does not crop or pad an image when the aspect ratio changes what the image shows. Use another file or remove the Instagram Destination.

Publish the reviewed Post

Publish the same Post with its current version and the Instagram Destination ID.
Send the body to POST /workspaces/{workspace_id}/posts/publish. Add a unique Idempotency-Key header. Use the same key when you retry the same request after a timeout. For a scheduled Post, use when: "schedule" and provide the publication time described in Queue, schedule, and retry.

Check the result

Use GET /workspaces/{workspace_id}/posts/{post} after the request. The response includes the Post state and publication receipt. If the Post enters preparing, it has not reached Instagram. Poll the Post until it becomes ready, scheduled, or needs-attention. Do not confirm the same Post again after it moves from preparing. If Instagram returns a media validation error, correct the file or the destination_options.instagram.placement value. A Post and a Story accept an image. A Reel requires a video.