InstagramInstagramSocial

Stage an Instagram post — create its media container

instagram.instagram.media.container.create

Stage an Instagram post by creating the media container it will be published from

Price
freeAu prix du fournisseur
Success rate
—Aucune donnée de taux de réussite pour le momentAucune donnée de taux de réussite pour le moment
Latency p50
——
Last verified
—Not verified yet
POSThttps://toolswitch.dev/v1/tools/instagram.instagram.media.container.createPreview
Try onlineBientôtProvider docs ↗
  • Uses platform quota
  • Synchronous response
  • Reads public data

Paramètres

step 1 of the publish flow. Needs instagram_content_publish (treg's `post` capability — a `read` connection 403s here) and returns {id: <container id>}. A VIDEO container is not ready when this returns: poll instagram.media.container.status until status_code is FINISHED before publishing, or the publish call fails. Stories have no carousel — publish each story as its own container

ParamètreTypeObligatoireDescriptionExemple
Paramètres de chemin
ig_user_idchaîneObligatoirenumeric Instagram professional account id — the same one instagram.user.profile takes17841400000000000
Paramètres de requête
captionchaîneFacultatifup to 2,200 characters and 30 hashtags. On a carousel the caption belongs on the PARENT container — set it on a child and the post publishes captionlessThree things we learned this week.
childrenchaîneFacultatifCAROUSEL parent only: comma-separated child container ids, 2 to 10 of them, in display order17890000000000001,17890000000000002
image_urlchaîneFacultatifpublic JPEG URL. Use this OR video_url, never bothhttps://example.com/photo.jpg
video_urlchaîneFacultatifpublic MP4 URLhttps://example.com/clip.mp4
media_typechaîneFacultatifomit for a plain feed image; REELS for a video in the feed, STORIES for a 24-hour story, CAROUSEL for the parent container that groups childrenREELS
location_idchaîneFacultatifa Facebook Page id that has a location
thumb_offsetentierFacultatifvideo only — milliseconds into the clip to take the cover frame from0
collaboratorschaîneFacultatifJSON array of @handles invited as collaborators; not allowed on stories
is_carousel_itembooléenFacultatiftrue on each child container of a carousel; children carry no caption and are never published on their owntrue
  • Paramètres de chemin
  • ig_user_idchaîneObligatoire

    numeric Instagram professional account id — the same one instagram.user.profile takes

    Exemple : 17841400000000000

  • Paramètres de requête
  • captionchaîneFacultatif

    up to 2,200 characters and 30 hashtags. On a carousel the caption belongs on the PARENT container — set it on a child and the post publishes captionless

    Exemple : Three things we learned this week.

  • childrenchaîneFacultatif

    CAROUSEL parent only: comma-separated child container ids, 2 to 10 of them, in display order

    Exemple : 17890000000000001,17890000000000002

  • image_urlchaîneFacultatif

    public JPEG URL. Use this OR video_url, never both

    Exemple : https://example.com/photo.jpg

  • video_urlchaîneFacultatif

    public MP4 URL

    Exemple : https://example.com/clip.mp4

  • media_typechaîneFacultatif

    omit for a plain feed image; REELS for a video in the feed, STORIES for a 24-hour story, CAROUSEL for the parent container that groups children

    Exemple : REELS

  • location_idchaîneFacultatif

    a Facebook Page id that has a location

  • thumb_offsetentierFacultatif

    video only — milliseconds into the clip to take the cover frame from

    Exemple : 0

  • collaboratorschaîneFacultatif

    JSON array of @handles invited as collaborators; not allowed on stories

  • is_carousel_itembooléenFacultatif

    true on each child container of a carousel; children carry no caption and are never published on their own

    Exemple : true

Exemples de code

Remplacez $TOOLSWITCH_KEY par la clé créée dans la console.

Preview
curl -X POST 'https://toolswitch.dev/v1/tools/instagram.instagram.media.container.create' \
  -H "X-Toolswitch-Key: $TOOLSWITCH_KEY"

Cette API de passerelle est en préversion ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives. Les appels sont facturés à free, frais de service inclus.