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.Get API KeySign up for free and get your API key in seconds.
- 2.Connect AccountUse our OAuth flow to connect Instagram accounts.
- 3.Start PostingMake API calls to post content to Instagram.
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
Create or schedule an Instagram post (photo, carousel, or Reel)
Get status and details of an Instagram post
Cancel a scheduled Instagram post
List all connected Instagram Business/Creator accounts
Media Requirements
| Type | Format | Max Size | Notes |
|---|---|---|---|
| Image | JPEG, PNG | 8 MB | 1:1, 4:5, or 1.91:1 aspect ratio |
| Carousel | JPEG, PNG, MP4 | Up to 10 items | Mix of photos and videos |
| Reels | MP4, MOV | 1 GB | 9:16 aspect, 3-90 sec |
| Stories | JPEG, PNG, MP4 | 30 MB | 9: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
{
"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

