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

1

Get API Key

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

2

Connect Account

Use our OAuth flow to connect Facebook accounts.

3

Start Posting

Make API calls to post content to Facebook.

Post to Facebook Page
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: '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

POST/v1/posts

Create or schedule a Facebook post (text, photo, video, or link)

GET/v1/posts/{id}

Get status and details of a Facebook post

DELETE/v1/posts/{id}

Cancel a scheduled Facebook post

GET/v1/profiles

List all connected Facebook Pages and profiles

Media Specs

Media Requirements

TypeFormatMax SizeNotes
ImageJPEG, PNG, GIF, BMP4 MB1200x630 recommended
VideoMP4, MOV10 GBUp to 240 min duration
CarouselJPEG, PNGUp to 10 imagesSquare or landscape
LinkURLN/AAuto-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

Response
200 OK
{
  "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