API Reference

Instagram API

Post photos, Reels, Stories, and carousels to Instagram with a single API call.

Quick Start

Get started in 3 steps

1

Get API Key

Sign up for free and get your API key in seconds.

2

Connect Account

Use our OAuth flow to connect Instagram accounts.

3

Start Posting

Make API calls to post content to Instagram.

Post to Instagram
JavaScript
const response = await fetch('https://getlate.dev/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Beautiful sunset today! #photography #nature',
    mediaItems: [{ type: 'image', url: 'https://example.com/photo.jpg' }],
    platforms: [{
      platform: 'instagram',
      accountId: 'acc_abc123'
    }],
    publishNow: true
  })
});

const post = await response.json();
console.log(post.post._id); // '65f1c0a9e2b5af0012ab34cd'

Endpoints

Instagram Endpoints

POST/v1/posts

Create or schedule an Instagram post (photo, carousel, or Reel)

GET/v1/posts/{id}

Get status and details of an Instagram post

DELETE/v1/posts/{id}

Cancel a scheduled Instagram post

GET/v1/profiles

List all connected Instagram Business/Creator accounts

Media Specs

Media Requirements

TypeFormatMax SizeNotes
ImageJPEG, PNG8 MB1:1, 4:5, or 1.91:1 aspect ratio
CarouselJPEG, PNG, MP4Up to 10 itemsMix of photos and videos
ReelsMP4, MOV1 GB9:16 aspect, 3-90 sec
StoriesJPEG, PNG, MP430 MB9:16 aspect ratio

Late automatically transcodes and optimizes media for Instagram's requirements.

Rate Limits

API Limits

Instagram's Graph API has rate limits based on your app's usage tier. Late automatically manages rate limits and retries to ensure reliable posting.

Late handles all rate limiting automatically. We queue and retry requests as needed.

Capabilities

Features

  • Post photos, carousels, Reels, and Stories
  • Schedule posts for optimal engagement times
  • Automatic image/video optimization
  • Multi-account management (Business & Creator)
  • Webhook notifications for post status
  • Caption, hashtags, and location support
  • First comment automation

Response

Response Example

Response
200 OK
{
  "post": {
    "_id": "65f1c0a9e2b5af0012ab34cd",
    "status": "published",
    "content": "Beautiful sunset today! #photography #nature",
    "platforms": [{
      "platform": "instagram",
      "accountId": { "_id": "acc_abc123", "username": "yourhandle" },
      "status": "published",
      "platformPostId": "17895695668004550",
      "platformPostUrl": "https://instagram.com/p/ABC123"
    }],
    "publishedAt": "2025-01-10T10:30:00Z",
    "createdAt": "2025-01-10T10:29:55Z"
  },
  "message": "Post published successfully"
}

Start building with Instagram API

Skip the Instagram Graph API complexity. Late handles OAuth, media processing, and rate limits so you can ship faster.

Free tier available • No credit card required • 99.97% uptime