API Reference
Facebook API
Post to Facebook Pages and Groups with a single API call. Photos, videos, links, and more.
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 Facebook accounts.
Start Posting
Make API calls to post content to Facebook.
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: 'Check out our latest product update! 🎉',
mediaItems: [{ type: 'image', url: 'https://example.com/product.jpg' }],
platforms: [{
platform: 'facebook',
accountId: 'acc_abc123'
}],
publishNow: true
})
});
const post = await response.json();
console.log(post.post._id); // '65f1c0a9e2b5af0012ab34cd'Endpoints
Facebook Endpoints
/v1/postsCreate or schedule a Facebook post (text, photo, video, or link)
/v1/posts/{id}Get status and details of a Facebook post
/v1/posts/{id}Cancel a scheduled Facebook post
/v1/profilesList all connected Facebook Pages and profiles
Media Specs
Media Requirements
| Type | Format | Max Size | Notes |
|---|---|---|---|
| Image | JPEG, PNG, GIF, BMP | 4 MB | 1200x630 recommended |
| Video | MP4, MOV | 10 GB | Up to 240 min duration |
| Carousel | JPEG, PNG | Up to 10 images | Square or landscape |
| Link | URL | N/A | Auto-fetches preview |
Late automatically transcodes and optimizes media for Facebook's requirements.
Rate Limits
API Limits
Facebook's Graph API has rate limits based on your app's usage tier. Late manages rate limits automatically and retries failed requests.
Late handles all rate limiting automatically. We queue and retry requests as needed.
Capabilities
Features
- Post to Facebook Pages and Groups
- Schedule posts for optimal engagement
- Photos, videos, and carousel support
- Link posts with rich previews
- Multi-page management
- Webhook notifications for post status
- Target audience settings
Response
Response Example
{
"post": {
"_id": "65f1c0a9e2b5af0012ab34cd",
"status": "published",
"content": "Check out our latest product update! 🎉",
"platforms": [{
"platform": "facebook",
"accountId": { "_id": "acc_abc123", "username": "YourPage" },
"status": "published",
"platformPostId": "123456789012345_987654321098765",
"platformPostUrl": "https://facebook.com/123456789012345/posts/987654321098765"
}],
"publishedAt": "2025-01-10T10:30:00Z"
},
"message": "Post published successfully"
}Start building with Facebook API
Skip the Facebook Graph API complexity. Late handles OAuth, media uploads, and permissions so you can ship faster.
Free tier available • No credit card required • 99.97% uptime