Instagram API Reference

Publish images, videos, carousels, and Reels to Instagram via the API.

Quick reference

authOAuth 2.0 (Meta)
text Limit2,200 characters
max Media10 items (carousel)
media RuleMedia is required — no text-only posts
max Video Duration90 s
entity SelectionNone
first CommentSupported — 1,000 bytes (UTF-8); skipped on Stories

Content types

—Text-only

Not supported — media is always required

✓Images

JPEG, PNG, WebP. Max 100 MB.

✓Video

MP4 or MOV. Max 500 MB. Up to 90 seconds.

✓Carousel

Up to 10 images/videos per carousel

✓Reels

Short-form video. Same limits as video.

Media requirements

Constraints enforced by Instagram's API. Requests that violate these limits will be rejected.

ConstraintValue
Max image size100 MB
Max video size500 MB
Image formatsJPEG, PNG, WEBP
Video formatsMP4, QUICKTIME
Max video duration1 min 30 s
Image aspect ratio4:5 to 1.91:1
Min image dimensions320x320 px
Max media items10
GIF supportNo

Platform settings

Pass these fields inside platformSettings.instagram in the request body.

postType
stringOptional

Type of Instagram post.

Default: post

poststoryreelcarousel
collaborators
string[]Optional

Up to 3 Instagram usernames invited as co-authors (letters, numbers, dots and underscores; the @ is optional; no duplicates). Each name is checked with Instagram when the post is created, and a name Instagram can't find returns 400 "Instagram can't find @name. Check the spelling." Not available on Stories. Needs an account connected with the new Instagram login (supports.collaborators on GET /api/v1/accounts).

music
objectOptional

A song for a Reel: { audioId, title?, artist?, durationMs?, artworkUrl? }. audioId is required and comes from GET /api/v1/instagram/audio; the other fields from the same result name the song on the post. Only with postType "reel" and a single video. Needs an account connected with the new Instagram login (supports.music on GET /api/v1/accounts). If Instagram refuses the song when publishing, the Reel posts without it and platforms[].warning says so.

Collaborators and music cannot be changed with PATCH /api/v1/posts/:id: delete the post and create it again. The Posts API page lists every error these two return.

Code examples

Basic post

curl -X POST https://schedulala.com/api/v1/posts \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Beautiful sunset today #photography",
"platforms": [
{ "platform": "instagram", "accountId": "acc_456" }
],
"mediaItems": [
{ "type": "image", "url": "https://example.com/sunset.jpg" }
],
"publishNow": true
}'

Post with media

curl -X POST https://schedulala.com/api/v1/posts \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Travel highlights #travel",
"platforms": [
{ "platform": "instagram", "accountId": "acc_456" }
],
"mediaItems": [
{ "type": "image", "url": "https://example.com/photo1.jpg" },
{ "type": "image", "url": "https://example.com/photo2.jpg" },
{ "type": "image", "url": "https://example.com/photo3.jpg" }
],
"publishNow": true
}'

Quirks & gotchas

!

Media is required on every post — no text-only posts allowed.

!

Max 30 hashtags per caption.

!

Image aspect ratio must be between 4:5 (portrait) and 1.91:1 (landscape).

!

Minimum image dimensions: 320x320 px.

!

GIFs are not supported — convert to MP4 first.

!

Carousel posts automatically detected when multiple media items are included.

!

Collaborators (up to 3) and a song on Reels need an account connected with the new Instagram login.

Related