Stage an Instagram post — create its media container
instagram.instagram.media.container.createStage an Instagram post by creating the media container it will be published from
- Price
- free제공업체 원가
- Success rate
- —성공률 데이터가 아직 없습니다성공률 데이터가 아직 없습니다
- Latency p50
- ——
- Last verified
- —Not verified yet
POSThttps://toolswitch.dev/v1/tools/instagram.instagram.media.container.createPreview- Uses platform quota
- Synchronous response
- Reads public data
파라미터
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
| 파라미터 | 유형 | 필수 | 설명 | 예시 |
|---|---|---|---|---|
| 경로 파라미터 | ||||
ig_user_id | 문자열 | 필수 | numeric Instagram professional account id — the same one instagram.user.profile takes | 17841400000000000 |
| 쿼리 파라미터 | ||||
caption | 문자열 | 선택 | 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 | Three things we learned this week. |
children | 문자열 | 선택 | CAROUSEL parent only: comma-separated child container ids, 2 to 10 of them, in display order | 17890000000000001,17890000000000002 |
image_url | 문자열 | 선택 | public JPEG URL. Use this OR video_url, never both | https://example.com/photo.jpg |
video_url | 문자열 | 선택 | public MP4 URL | https://example.com/clip.mp4 |
media_type | 문자열 | 선택 | 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 | REELS |
location_id | 문자열 | 선택 | a Facebook Page id that has a location | |
thumb_offset | 정수 | 선택 | video only — milliseconds into the clip to take the cover frame from | 0 |
collaborators | 문자열 | 선택 | JSON array of @handles invited as collaborators; not allowed on stories | |
is_carousel_item | 불리언 | 선택 | true on each child container of a carousel; children carry no caption and are never published on their own | true |
- 경로 파라미터
ig_user_id문자열필수numeric Instagram professional account id — the same one instagram.user.profile takes
예시:
17841400000000000- 쿼리 파라미터
caption문자열선택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
예시:
Three things we learned this week.children문자열선택CAROUSEL parent only: comma-separated child container ids, 2 to 10 of them, in display order
예시:
17890000000000001,17890000000000002image_url문자열선택public JPEG URL. Use this OR video_url, never both
예시:
https://example.com/photo.jpgvideo_url문자열선택public MP4 URL
예시:
https://example.com/clip.mp4media_type문자열선택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
예시:
REELSlocation_id문자열선택a Facebook Page id that has a location
thumb_offset정수선택video only — milliseconds into the clip to take the cover frame from
예시:
0collaborators문자열선택JSON array of @handles invited as collaborators; not allowed on stories
is_carousel_item불리언선택true on each child container of a carousel; children carry no caption and are never published on their own
예시:
true
코드 예제
$TOOLSWITCH_KEY를 콘솔에서 생성한 키로 바꾸세요.
curl -X POST 'https://toolswitch.dev/v1/tools/instagram.instagram.media.container.create' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/instagram.instagram.media.container.create",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/instagram.instagram.media.container.create", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());게이트웨이 API는 미리보기 버전이며 URL과 인증 방식이 변경될 수 있습니다. 예제 매개변수는 샘플 데이터입니다. 호출 요금은 free이며 서비스 수수료가 포함되어 있습니다.