API in early access
Build publishing into your own workflows.
One REST API for Facebook Pages, Instagram, Threads, YouTube and TikTok. It’s the same engine behind the Flenvio dashboard, so your code, your agents and your team share accounts, groups and post history.
API keys are created in the dashboard, which is invite-only for now. The documentation is public.
curl -X POST "https://api.flenvio.com/v1/posts" \
-H "x-api-key: $FLENVIO_API_KEY" \
-H 'Idempotency-Key: 6a1f9d52-0000-4000-8000-000000000001' \
-H 'Content-Type: application/json' \
-d '{
"accountIds": [
"acc1a000-0000-4000-8000-000000000002",
"acc1a000-0000-4000-8000-000000000001",
"acc1a000-0000-4000-8000-000000000003"
],
"caption": "New single origin from Huila just landed. Bright, juicy, a little floral. On the bar from Thursday, and in bags online.",
"mediaUrls": [
"https://media.flenvio.example/uploads/5c1f0e2a-0000-4000-8000-000000000001.jpg"
],
"scheduledAt": "2026-10-27T14:00:00.000Z",
"tiktokOptions": {
"privacyLevel": "PUBLIC_TO_EVERYONE"
}
}'201 Created
{
"postId": "b0570000-0000-4000-8000-000000000001",
"status": "scheduled"
}In your Flenvio dashboard, under Posts
Publishes to
- Facebook Pages
- Threads
- YouTube
- TikTok
Automate the busywork.
What teams build with the Flenvio API. Every one of these uses endpoints that exist today.
Publish every new article
When your blog or shop publishes something, post it to your accounts with its image.
POST /v1/postsSchedule from a spreadsheet
Turn a content plan into scheduled posts, then move or cancel them as plans change.
POST /v1/posts/{id}/rescheduleLet an AI assistant help
An agent drafts, uploads and schedules, and asks you before anything is published.
GET /v1/accountsPublish from your product
Give your own users social publishing, using the accounts connected to your Flenvio workspace.
POST /v1/media/uploadsReport on what went out
A read-only key for dashboards: every post with each account’s delivery status.
GET /v1/posts?statuses=FAILEDAnswer from your tools
Pull comments and Facebook and Instagram messages into your own support workflow.
GET /v1/inbox/conversations
Your first post in three steps.
Plain HTTPS and JSON, with your key in the x-api-key header. Works from any language, cron job or no-code tool that can make an HTTP request.
Step 1
Create a key
In Settings → Developer, name the key, choose Full access or Read only, and pick when it expires (30 days, 90 days, a year or never). It’s shown once; Flenvio stores only a hash. Up to 10 active keys, each revocable on its own.
How keys work
Step 2
List your accounts
Accounts are connected in the dashboard, through each platform’s own sign-in. The API returns them with an id to publish to and a
Accounts referenceconnectionStatus, so you know when one needs reconnecting.curl "https://api.flenvio.com/v1/accounts" \ -H "x-api-key: $FLENVIO_API_KEY"200OK (first two items)
[ { "id": "acc1a000-0000-4000-8000-000000000001", "platform": "INSTAGRAM", "accountName": "lumen.coffee", "avatarUrl": "https://media.flenvio.example/avatars/lumen-ig.png", "platformAccountId": "17841400000000001", "createdAt": "2026-09-02T14:05:11.000Z", "connectionStatus": "ACTIVE" }, { "id": "acc1a000-0000-4000-8000-000000000002", "platform": "FACEBOOK", "accountName": "Lumen Coffee Roasters", "avatarUrl": "https://media.flenvio.example/avatars/lumen-fb.png", "platformAccountId": "100000000000001", "createdAt": "2026-09-02T14:03:40.000Z", "connectionStatus": "ACTIVE" } ]Step 3
Publish, then follow each account
Create the post with the account ids (leave out
Full quickstartscheduledAtto publish now), then read it back. Every account has its own delivery with a status and, if it failed, the reason.curl "https://api.flenvio.com/v1/posts/b0570000-0000-4000-8000-000000000001" \ -H "x-api-key: $FLENVIO_API_KEY"200OK (abridged)
{ "id": "b0570000-0000-4000-8000-000000000001", "caption": "New single origin from Huila just landed. Bright, juicy, a little floral.", "scheduledAt": null, "logs": [ { "status": "COMPLETED", "errorMessage": null, "connectedAccount": { "platform": "INSTAGRAM", "accountName": "lumen.coffee" } }, { "status": "FAILED", "errorMessage": "Meta Graph error (400): (#324) Requires upload file", "connectedAccount": { "platform": "FACEBOOK", "accountName": "Lumen Coffee Roasters" } } ] }
Five platforms, one request shape.
The same fields for every platform, plus options where a platform needs them. Before a post is accepted it’s checked against the rules of every platform it targets; if anything is wrong you get one plain sentence per problem and nothing is created.
| Platform | What you can publish | Text limit | Comments | Direct messages | Per-post settings |
|---|---|---|---|---|---|
| Facebook Pages | Text, one video, or up to 20 images | 2,200 | Comments: yes | Direct messages: yes | — |
| Images, videos and carousels of up to 10 | 2,200 | Comments: yes | Direct messages: yes | — | |
| Threads | Text, images, videos and carousels of up to 20 | 500 | Comments: yes | Direct messages: no | — |
| YouTube | One video per post | Title + description | Comments: yes | Direct messages: no | Title, description, visibility |
| TikTok | One video, or up to 35 photos | 2,200 | Comments: no | Direct messages: no | Audience, interactions, disclosures, AI label |
Limits come from the same rules the API enforces. Details per platform: platform rules.
Built for code that runs unattended.
The details that matter when a script or an agent publishes on your behalf.
- Safe retries
- Send an
Idempotency-Keywith each post. Repeating the request returns the original post withstatus: "duplicate"instead of publishing twice. - One delivery per account
- A repeated account id counts once. Each account gets its own delivery and status; failed deliveries are retried automatically, then can be retried one at a time with
POST /v1/posts/jobs/{deliveryId}/retry. - Scheduling
- Pass
scheduledAt(ISO 8601, up to 365 days ahead). Move it with/reschedule, call it off with/cancel. Scheduled posts appear in the dashboard, where a person can do the same. - Reconnect signals
- If an account’s sign-in has expired, creating a post answers
409withaccount_reconnect_requiredand the accounts involved, and nothing is created. - Media uploads
- Start an upload, send the file straight to storage, complete it; Flenvio reads the size, dimensions and duration and uses them in the platform checks. Small files can go in one request.
- Read-only keys
- A read-only key can only make
GETrequests; anything else answers403api_key_read_only. Good for dashboards, reporting and agents that only need to look.
- Requests per minute
- 120
- Posts per 24 hours
- 200
- Accounts per post
- 50
- Connected accounts
- 50
Early-access limits, documented in Errors and rate limits; they may change as the API grows.
Give an AI agent a publishing desk.
Claude Code, Cursor and other agents that can make HTTP requests can draft, upload, schedule and report back through the API. The docs include a setup prompt that tells the agent to show you the post, accounts and time, and wait for your yes before it publishes.
- A key per agent, in an environment variable, with a short expiry
- Read-only keys for agents that only report
- /llms.txt and /llms-full.txt: the whole documentation in one request
- List accounts and groups; confirm which ones to use.
- Draft the text and check it against the platform rules.
- Upload media and show what it will attach.
- Show the final post, accounts and time. Wait for a yes.
- Create the post with a fresh Idempotency-Key.
- Poll until each delivery finishes; report results and errors.
The workflow the setup prompt asks agents to follow (from the docs).
What the API covers today.
Every endpoint is documented with parameters, examples in curl, JavaScript and Python, errors and limits.
Accounts
The accounts you can publish to, with each one’s connection status.
- GET
/v1/accounts - DELETE
/v1/accounts/{id}
Posts
Publish now or schedule, follow each delivery, retry, reschedule, cancel, archive.
- POST
/v1/posts - GET
/v1/posts - GET
/v1/posts/{id} - POST
/v1/posts/jobs/{deliveryId}/retry - POST
/v1/posts/{id}/reschedule - POST
/v1/posts/{id}/cancel - POST
/v1/posts/{id}/archive
Media
Upload images and videos straight to storage, then attach them to posts.
- POST
/v1/media/uploads - POST
/v1/media/uploads/{id}/complete - POST
/v1/media/upload
Groups
The same groups your team uses in the dashboard.
- GET
/v1/account-groups - POST
/v1/account-groups - PATCH
/v1/account-groups/{id} - DELETE
/v1/account-groups/{id}
Comments and messages
Read, reply to and moderate comments; read and send Facebook and Instagram DMs.
- GET
/v1/comments - POST
/v1/{platform}/comments/{commentId}/replies - GET
/v1/inbox/conversations - POST
/v1/{instagram|facebook}/conversations/{id}/messages
TikTok creator info
Which audiences and interactions a TikTok account allows, before you post.
- GET
/v1/tiktok/accounts/{accountId}/creator-info
Not in the API yet
- Webhooks: Flenvio doesn’t call your server when a delivery finishes; poll the post instead
- Connecting accounts (each platform’s sign-in needs a person in a browser) and managing API keys
- Editing a post after it’s created, or saved drafts on the server
- Official SDKs or an MCP server; any HTTP client works
- Team, workspace and billing endpoints
Start here
- Quickstart: a key, your accounts, a first post
- Upload media for Instagram, YouTube and TikTok
- Publish to several accounts with groups
- Changelog: what changed, and when
Your product, and a dashboard for the humans.
Posts you create through the API appear in the Flenvio dashboard with the same statuses. Your team can see what your integration published, retry a failure or cancel a scheduled post without touching code.
Ways in
- WorkspaceThe composer, Posts, Comments and Inbox in your browser
- REST APIYour scripts, products and automations, with an API key
- AI agentsThrough the same API, with a setup prompt and llms.txt
One publishing engine
- Accounts and groupsConnected once in the dashboard, then shared by the composer and the API.
- Platform checksEvery post is checked against each target platform’s rules before it’s accepted.
- SchedulingPublish now, or at a time you choose, up to a year ahead.
- DeliveryOne delivery per account. A failed one is retried automatically (up to 3 attempts), then shows the reason and a retry.
- HistoryEach account’s status, in the Posts list and from GET /v1/posts.
Where it lands
- Facebook Pages
- Threads
- YouTube
- TikTok
Comments and messages come back into the same workspace and API.
Invite-only early access
Get an API key.
Keys come with a Flenvio account, which is invite-only during early access. Leave your email and tell us what you’re building.