API Reference
Instagram API
Post photos, Reels, Stories, and carousels to Instagram with a single API call.
Quick Start
Get started in 3 steps
Get API Key
Sign up for free and get your API key in seconds.
Connect Account
Use our OAuth flow to connect Instagram accounts.
Start Posting
Make API calls to post content to Instagram.
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
/v1/postsCreate or schedule an Instagram post (photo, carousel, or Reel)
/v1/posts/{id}Get status and details of an Instagram post
/v1/posts/{id}Cancel a scheduled Instagram post
/v1/profilesList all connected Instagram Business/Creator accounts
Media Specs
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 |
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
{
"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