Facebook API

Facebook posting API for developers and agents

Schedule Facebook feed posts and Reels from one REST API. Built for scripts, custom apps, and AI agents.

  • 7-day free trial
  • Feed + Reels
  • Plans from $9.99/mo

step by step

How to post to Facebook with the API

Create a key, connect Facebook, then schedule a post.

Open the step-by-step guide

01Create an API key

Open Dashboard → AI & API, create a key, and send it as Authorization: Bearer pw_live_…. Connect your Facebook account if you have not already.

Endpoints

API base URL

https://postwing.io/api/v2

Docs

https://postwing.io/docs
02Schedule to Facebook

Call POST /posts with a caption, a time, your Facebook account id from GET /accounts, and media. Full field reference is in the API docs.

Example Facebook Reel
curl -s -X POST "https://postwing.io/api/v2/posts" \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "caption": "New Reel from the Facebook posting API",
  "scheduled_at": "2026-10-05T18:00:00Z",
  "accounts": [
    {
      "id": "FACEBOOK_ACCOUNT_ID",
      "options": {
        "format": "reel"
      }
    }
  ],
  "media": [
    {
      "url": "https://cdn.example.com/reel.mp4",
      "type": "video"
    }
  ]
}'

what you can do

Facebook posting from one API

Same PostWing API as the full product, scoped to Facebook when you post to a Facebook account.

  • Schedule Facebook feed posts and Reels
  • Upload images and videos with a direct upload URL
  • Choose post or reel format for video
  • Schedule in one call; edit or cancel any time before it publishes
  • Edit or cancel scheduled Facebook posts from the same API

built for Facebook

Feed posts and Reels in one flow

Upload media, set a caption, pick a time, and target Facebook. For video, choose the post or reel format.

  • Images publish to the Facebook feed
  • Videos default to Reels; set format to post for the feed
  • Scheduled posts show up on your PostWing calendar

Facebook options

Platform settings that matter

Set these on accounts[].options when you need more control.

  • format post or reel (video defaults to reel)
  • Clear errors with a code and the exact field to fix
  • API key or OAuth with scoped access

one API

Same API for every network

There is no separate Facebook product. List more account ids in accounts on the same call. Add Instagram, TikTok, YouTube, LinkedIn, X, Facebook, Pinterest, or Threads without changing your integration.

  • Facebook
  • Pinterest
  • LinkedIn
  • X (Twitter)
  • Threads
  • YouTube
  • TikTok
  • Instagram

Connect accounts once in PostWing (or via the accounts endpoints)

Call POST /posts with every account you want on that post

It is on your calendar. One key covers every platform PostWing supports.

questions

Facebook posting API FAQ

Yes. Upload a video and set options.format to reel (the default for video).

ready when you are

Schedule your next Facebook post from the API

Create an API key, connect Facebook, and schedule feed posts or Reels from your app.

7-day free trial · Cancel anytime