API Reference

Instagram API

Instagram's Graph API requires Facebook app review, Business account verification, and two-step media container creation. Zernio replaces all of that with one POST request for photos, Reels, Stories, and carousels.

Quick Start

  1. 1.
    Get API Key
    Sign up for free and get your API key in seconds.
  2. 2.
    Connect Account
    Use our OAuth flow to connect Instagram accounts.
  3. 3.
    Start Posting
    Make API calls to post content to Instagram.
Post to Instagram
JavaScript
const response = await fetch('https://zernio.com/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'

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 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

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

API Limits

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

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

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 Example

Response
JSON
{
  "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

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

SOC 2 CompliantGDPR Compliant