Quickstart
From a new API key to a scheduled post in five requests.
-
Create a key. In PostFlow, open Settings → Integrations → API & MCP, name the key (
n8n,my-script), keep Full access selected and create it. Copy it now: it’s shown once.Terminal window export POSTFLOW_API_KEY=pf_... -
Check the workspace.
/mereturns its name, time zone and plan.Terminal window curl https://postflow.biz.id/api/v1/me \-H "Authorization: Bearer $POSTFLOW_API_KEY"{"workspace": { "id": "ws_…", "name": "Kopi Senja", "timezone": "Asia/Jakarta", "approvalRequired": false },"subscription": { "status": "active", "plan": "Starter", "endsAt": "2026-11-30T16:59:59.000Z" },"limits": { "workspaces": 1, "socialAccounts": 3, "postsPerMonth": 60, "members": 1, "storageBytes": 2147483648 },"member": { "id": "u_…", "name": "Rani", "role": "owner" },"credential": { "type": "api_key", "name": "my-script", "scope": "write" }} -
List the accounts. Each one lists the content types it can publish.
Terminal window curl https://postflow.biz.id/api/v1/accounts \-H "Authorization: Bearer $POSTFLOW_API_KEY"[{ "id": "acc_ig", "platform": "instagram", "name": "Kopi Senja", "username": "kopisenja", "avatarUrl": null,"status": "active", "error": null, "contentTypes": ["ig_image", "ig_carousel", "ig_reel", "ig_story"] }] -
Bring in a photo. PostFlow downloads it from a public
https://URL and returns its id. (Or upload the bytes.)Terminal window curl https://postflow.biz.id/api/v1/media \-H "Authorization: Bearer $POSTFLOW_API_KEY" \-H "Content-Type: application/json" \-d '{ "url": "https://example.com/promo-oktober.jpg" }' -
Schedule the post. One target per account, with a content type that account supports. Check it first with
POST /posts/validateif you like: same body.Terminal window curl https://postflow.biz.id/api/v1/posts \-H "Authorization: Bearer $POSTFLOW_API_KEY" \-H "Content-Type: application/json" \-d '{"caption": "Es kopi gula aren, diskon 20% sampai Minggu ☕","mediaIds": ["MEDIA_ID"],"targets": [{ "socialAccountId": "acc_ig", "contentType": "ig_image", "options": { "firstComment": "#kopi #promo" } }],"action": "schedule","scheduledAt": "2026-11-03T09:00:00+07:00"}'The response is the post with
status: "scheduled". It’s on the PostFlow calendar right away.
- Not sure about the time? Send
"useNextSlot": trueinstead ofscheduledAtto use the queue. - Get told when it goes live: add a webhook for
post.published. - Everything a post can carry: Creating and scheduling posts.