Instagram API Guide

How to Schedule Instagram Timeline Posts via API

Publish feed posts to Instagram using the PostFast API. Schedule images, carousels, and videos that appear on your profile grid.

Last updated: January 2025
Automate your Instagram content strategyGet API Key

Instagram Timeline posts are permanent feed content that appears on your profile grid and in followers' feeds. Using the PostFast API, you can schedule Timeline posts by setting instagramPublishType to "TIMELINE" (or omitting it since TIMELINE is the default).

Timeline posts support images (single or carousel) and videos. You can control whether the post appears on your profile grid with the instagramPostToGrid option, and invite collaborators to co-author the post.

Key capabilities when scheduling Instagram Timeline posts via API include single images, multi-image carousels, video posts, grid visibility control, and collaborator invitations.

API Parameters

ParameterTypeDescription
instagramPublishTypestringType of Instagram post to create
TIMELINESTORYREEL
instagramPostToGridbooleanPost to profile grid (for Reels)
instagramCollaboratorsstring[]Array of Instagram usernames for collaboration

Code Example

const response = await fetch('https://api.postfa.st/social-posts', {
  method: 'POST',
  headers: {
    'pf-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
        "posts": [
            {
                "content": "Beautiful moments captured! #instagram #photography",
                "mediaItems": [
                    {
                        "key": "image/f5a6b7c8-d9e0-1234-5678-90abcdef1234.jpg",
                        "type": "IMAGE",
                        "sortOrder": 0
                    }
                ],
                "scheduledAt": "2025-01-31T10:00:00.000Z",
                "socialMediaId": "770fa600-04bd-43f6-c938-667877660003"
            }
        ],
        "controls": {
            "instagramPublishType": "TIMELINE",
            "instagramPostToGrid": true
        }
    })
});

const data = await response.json();

Did You Know?

Images
Up to 10 images
Single image or carousel with up to 10 images
Video
1 video per post
Videos cannot be mixed with images in the same post
Aspect Ratio
1:1 or 4:5
Square (1:1) or portrait (4:5) recommended. 4:5 maximizes screen space in feed.
Caption
2,200 characters
Captions longer than 2,200 characters will be truncated

Tips

instagramPublishType: "TIMELINE" is the default, so you can omit it when posting feed content

Use sortOrder to control the order of images in carousel posts

Set instagramPostToGrid: false if you want the post in feed but not on your profile grid

Portrait (4:5) images take up more screen space in the feed and often get better engagement

Schedule Timeline posts, Reels, and Stories from one API

7-day free trial
Try PostFast Free

Common Pitfalls

Mixing images and videos

You cannot combine images and videos in a single Instagram post. Choose one media type per post.

Timeline vs Reel for video

Video Timeline posts do not get Reels algorithm distribution. For short-form video reach, use instagramPublishType: "REEL" instead.

Too many images

More than 10 images in a carousel will cause an error. Split into multiple posts if needed.

Frequently Asked Questions

What is the difference between TIMELINE and REEL for videos?

TIMELINE posts video to your feed and grid. REEL publishes to the Reels tab with full algorithm distribution and typically gets significantly more reach for short-form video content.

Can I hide a post from my profile grid?

Yes, set instagramPostToGrid: false. The post will appear in followers' feeds but not on your profile grid. This is useful for promotional content you do not want permanently on your profile.

How do carousels work?

Include multiple IMAGE items in your mediaItems array with sequential sortOrder values (0, 1, 2, etc.). Instagram displays them as a swipeable carousel.

Build your Instagram presence with programmatic posting

Start Free Trial
7-day free trialCancel anytime