Skip to main content
POST
Create a media container
Step 1 of the publish flow. Creates a media container from a public HTTPS media URL.
Poll the returned container ID until status_code is FINISHED, then publish it.

Authentication

Use the hmat_ channel token from GET /meta/channels/{id}/token or hookmyapp channels env <channel>. Do not use an hmok_ API key for this call.

Path parameters

string
required
The connected Instagram account ID.

Request body

string
Public HTTPS URL of a JPEG image. Required for images; either this or video_url for stories.
string
Public HTTPS URL of a video. Required for reels; either this or image_url for stories.
string
REELS, STORIES, or CAROUSEL. Omit for a feed image.
string
Post caption.
Set true when creating a child container for a carousel. Child containers take image_url (or video_url with media_type=VIDEO) and no caption.
string
For the carousel parent (media_type=CAROUSEL): the child container IDs created with is_carousel_item=true, as a comma-separated string (for example "17890000000000001,17890000000000002"). 2–10 items.
string
Cover image URL for reels.
See media requirements for size, format, and quota limits.

Example

Successful response

Containers expire after 24 hours.