Postfalcon
Postfalcon (https://postfalcon.co, open source, self-hostable) publishes posts to the user's
connected social accounts on a schedule. This skill drives its REST API with curl.
Setup
POSTFALCON_API_TOKEN(required): the user creates it in Postfalcon under Settings -> API access for agents. It starts withpf_. Never print it or put it in a post.POSTFALCON_BASE_URL(optional): defaults tohttps://postfalcon.co. Self-hosted users set it to their own instance's address.
Every request:
BASE="${POSTFALCON_BASE_URL:-https://postfalcon.co}"
AUTH="Authorization: Bearer $POSTFALCON_API_TOKEN"
Accounts themselves are connected in the Postfalcon web app (Accounts page), not through the API. If the platform the user wants isn't in the account list, tell them to connect it there.
Rules
- Scheduling a post means it will be published publicly. Before creating a scheduled or publish-now post, show the user the exact text, the target account(s), any media, and the time in their time zone, and get a clear yes. Saving a draft needs no confirmation.
- Times are ISO 8601 in UTC (
2026-12-05T09:30:00Z) and must be in the future. Convert from the user's local time; if you don't know their time zone, ask. - Never guess account ids. List accounts first and match by platform and name.
- If unsure, save a draft (omit
scheduled_for). The user can review it in the web app. - TikTok's rules require the user to choose a post's privacy level themselves: ask, never pick one.
List connected accounts
curl -s "$BASE/api/v1/social-accounts" -H "$AUTH"
Returns [{ "id", "platform", "display_name", "needs_reconnect_at", "expires_soon", ... }].
If needs_reconnect_at is set, posts to that account will fail until the user reconnects it on
the Accounts page; tell them. expires_soon: true means the same will happen within a week.
Create a post
Text only (JSON). One account with social_account_id, several with social_account_ids:
curl -s -X POST "$BASE/api/v1/posts" -H "$AUTH" -H "Content-Type: application/json" -d '{
"social_account_ids": [3, 7],
"content": "Our spring menu is live 🌱",
"scheduled_for": "2026-12-05T09:30:00Z"
}'
- Omit
scheduled_forto save a draft. "publish_now": true(instead ofscheduled_for) publishes within about a minute."repeat_interval": "daily" | "weekly" | "monthly"(plus optional"repeat_until") repeats a scheduled post.
With images or video (multipart; up to 10 files, 200 MB each). Repeat -F social_account_ids=
for each account:
curl -s -X POST "$BASE/api/v1/posts" -H "$AUTH" \
-F "social_account_ids=3" -F "social_account_ids=7" \
-F "content=Behind the scenes from today's shoot" \
-F "scheduled_for=2026-12-05T09:30:00Z" \
-F "media=@/path/to/photo1.jpg" -F "media=@/path/to/photo2.jpg" \
-F 'alt_texts=["Two chefs plating a dish","The finished plate"]'
alt_texts is a JSON array matching the files in order (optional, but good practice).
One account returns the post object; several return { "crosspost_group_id", "posts": [...] }:
one post per account, each with its own id and status.
Platform requirements
| Platform | Needs |
|---|---|
| at least one image or video (several = carousel; a single video posts as a Reel) | |
| an image | |
| YouTube | a video. Optional youtube_options: {"title": "...", "privacy_status": "public"|"unlisted"|"private", "made_for_kids": false}. Defaults to private if not set |
| TikTok | a video. tiktok_options: {"privacy_level": "PUBLIC_TO_EVERYONE"|"MUTUAL_FOLLOW_FRIENDS"|"FOLLOWER_OF_CREATOR"|"SELF_ONLY", "allow_comment": false, "allow_duet": false, "allow_stitch": false, "brand_organic": false, "brand_content": false}. Ask the user for privacy and interactions; brand_content can't be private. Without options it posts privately with interactions off |
| text (posts to the user's personal profile) | |
| Bluesky | text up to 300 characters, optional images |
| Threads | text up to 500 characters, optional images or video |
| Mastodon, Telegram, Facebook Pages | text, optional images or video |
In JSON bodies pass youtube_options / tiktok_options as objects; in multipart, as a JSON string
(-F 'tiktok_options={"privacy_level":"SELF_ONLY"}'). In a cross-post each applies only to that
platform's post.
List, change and delete posts
curl -s "$BASE/api/v1/posts?status=scheduled" -H "$AUTH" # draft, scheduled, posting, posted, failed, canceled (comma-separate several)
curl -s "$BASE/api/v1/posts/42" -H "$AUTH"
curl -s -X PATCH "$BASE/api/v1/posts/42" -H "$AUTH" -H "Content-Type: application/json" \
-d '{"scheduled_for": "2026-12-06T08:00:00Z"}' # also: content, status ("canceled" stops it), publish_now
curl -s -X DELETE "$BASE/api/v1/posts/42" -H "$AUTH" # permanent: confirm with the user first
A failed post has an error_message saying why. To retry, fix the cause, then PATCH it with a new
future scheduled_for and "status": "scheduled".
Analytics
curl -s "$BASE/api/v1/analytics/summary?days=30&tz=Australia/Sydney" -H "$AUTH" # days: 7, 30 or 90
Returns totals, a per-day series, a per-platform breakdown, the period's posts and the top post. Metrics come from Mastodon, Bluesky, Facebook, Instagram and YouTube. Telegram, TikTok, Pinterest, LinkedIn and Threads don't report them (null, not zero).
Errors
| Status | Meaning |
|---|---|
| 401 | Token missing, wrong or revoked. The user makes a new one in Settings -> API access for agents |
| 400 | Invalid request: the body says which field (e.g. a time in the past) |
402 plan_limit / plan_capability |
The user's plan doesn't allow it (e.g. cross-posting, repeating posts, more accounts) or their trial/subscription has ended. Point them to https://postfalcon.co/pricing |
| 404 | No such post or account for this user |
| 429 | Rate limited: wait a minute and retry |
Full API reference: $BASE/api-docs.
