Facebook Posting API
Post text, links, photos and video to Facebook Pages from your app, for every customer who connects a Page.
- Text, link, photo and video posts to Pages
- Connect Pages through Facebook Login
- A webhook when video processing finishes
- A result per Page, with the reason when one fails
const pk = new Postkey(process.env.POSTKEY_API_KEY);
await pk.posts.create({
content: "Our spring hours start Monday: 8am to 6pm.",
platforms: [
{
platform: "facebook",
accountId: "acc_fb_page_456",
platformSpecificData: {
link: "https://example.com/hours"
}
}
],
publishNow: true
});- Facebookpublished
1 call · result per platform
Your first Facebook post in three steps
- 1
Connect Facebook
Your customer signs in through Facebook's own login. You get an account ID, never a password.
- 2
Get the account id
List connected accounts. The id of the new account is the accountId you post with.
- 3
Post
Send the post to /v1/posts with that accountId. The Facebook result comes back in the response and by webhook.
Every Facebook format, one endpoint
Pick a format to see the exact request and what comes back. Options that only make sense on Facebook sit under "facebook".
A text post, with an optional link preview.
1POST https://api.postkey.dev/v1/posts2x-access-key: pk_live_…3Content-Type: application/json4 5{6 "content": "Our spring hours start Monday: 8am to 6pm.",7 "platforms": [8 {9 "platform": "facebook",10 "accountId": "acc_fb_page_456",11 "platformSpecificData": {12 "link": "https://example.com/hours"13 }14 }15 ],16 "publishNow": true17}200 · published
Live on Facebook. If it had failed, its credits would come back.
{
"success": true,
"postId": "post_3k9d2",
"status": "published",
"platforms": [
{
"platform": "facebook",
"accountId": "acc_fb_page_456",
"success": true,
"platformPostUrl": "https://www.facebook.com/…"
}
]
}Everything you need for Facebook posting
Checked against Facebook's rules
Before anything is sent, Postkey checks it against Facebook's published limits:
Pages, not profiles
Meta's API publishes to Facebook Pages. Postkey lists the Pages a person manages when they connect, and you post to the ones you choose.
Link previews
Add a link and Facebook builds the preview card from the page's own tags. Nothing extra to send.
Video tracked to the end
Facebook processes video after upload. You get a webhook when it's live, or the reason it failed.
Facebook Login
Page owners connect with Facebook's own login and permission screen. You never handle their password.
Pages grouped by client
Put each client's Pages in their own profile, so your code always knows which Pages belong to whom.
Also for Facebook
Built in
Connect, publish, get told
Your users connect Facebook through a connect link. If Facebook fails inside a multi-network post, the others still go out and the Facebook credits come back.
Works with your stack
Your code
Node and Python SDKs with the same calls, or plain REST from anything that speaks HTTP.
- Node
- Python
- {}REST
No-code tools
Call the REST API from an HTTP step in n8n, Make or Zapier. One request posts to every network.
- n8n
- Make
- Zapier
AI agents & MCP
The MCP server lets Claude, Cursor and other agent tools publish and schedule posts, and read the results.
- MCP server
Beyond Facebook
Same request shape on every platform. Add an account ID and the post goes there too.
- X Posting APIText · Image · Video · Thread
- Instagram Posting APIFeed post · Reel · Story · Carousel
- You're hereFacebook Posting APIText · Photo · Video
- TikTok Posting APIVideo · Photo
- LinkedIn Posting APIText · Image · Document
- YouTube Posting APIVideo
- YouTube Shorts Posting APIShort
- Pinterest Posting APIPin
- Google Business Posting APIUpdate post · Offer · Event
Facebook posting questions
Something not here? Email hello@postkey.dev.
Can I post to a personal Facebook profile?
No. Meta's API only allows publishing to Pages. That's a Facebook rule, not a Postkey one.
What can I post to a Page?
Text posts with or without a link, photo posts and video posts.
Who needs to connect the Page?
Someone who manages the Page. They sign in with Facebook, pick the Pages, and you get an account ID for each.
Why does a video post say 'processing'?
Facebook processes video before it appears. The call returns right away and a webhook follows with the final result.
Can I post to Facebook and Instagram together?
Yes. Put both account IDs in one request. You get a separate result for each.
Can I schedule Facebook posts instead?
Yes. Add scheduledFor to the same request. See the Facebook Scheduling API page for details.
Post to Facebook for every customer.
Get a key, connect an account, send the request above.
Free while it's early. Read the docs