Get started
Core concepts
Accounts and platforms, groups, posts and deliveries, statuses, scheduling and idempotency in the Flenvio API.
Accounts and platforms
An account is one place you publish to: a Facebook Page, an Instagram professional account, a Threads profile, a YouTube channel or a TikTok account. Each has an id (use it everywhere in the API), a platform (FACEBOOK, INSTAGRAM, THREADS, YOUTUBE or TIKTOK) and a connectionStatus:
| connectionStatus | Meaning |
|---|---|
ACTIVE | Ready to publish. |
REAUTH_REQUIRED | The platform stopped accepting Flenvio’s access (for example the password changed or access expired). Reconnect it in the dashboard. Until then, a post that targets it is refused with 409 and code: "account_reconnect_required" (nothing is created; accountIds in the error lists the accounts to reconnect), so skip these accounts. Deliveries scheduled before the account lapsed stay scheduled: if it’s reconnected in time they publish normally, otherwise they end FAILED with an error message asking you to reconnect, and can be retried once it is. |
Disconnected accounts don’t appear in the API at all. Accounts are connected in the dashboard, never through the API.
Groups
Groups are shortcuts for selecting several accounts at once, for example “Client: Lumen Coffee” or “Short-form video”. An account can be in many groups. Two groups can’t share a name, or contain exactly the same set of accounts.
A post doesn’t take a group directly: POST /v1/posts takes accountIds. To post to a group, read its members, combine them with any other groups or accounts you want, and remove duplicates so each account appears once (a repeated id is counted once, never published twice). That’s how an account that’s in two of your groups still receives the post once. The group you used isn’t recorded on the post. See Publish to several accounts.
Posts and deliveries
A post is what you create: the text (caption), optional media and the accounts to publish to. Its content is fixed once created.
Each target account gets its own delivery, listed in the post’s logs array. A delivery has its own id (the delivery id you retry with), status, errorMessage and platformPostId. One post to three accounts has three deliveries, and they can end differently: two published and one failed is normal.
Delivery statuses
| status | Dashboard label | Meaning |
|---|---|---|
SCHEDULED | Scheduled | Waiting for its scheduledAt time. |
PENDING | Queued | Accepted and waiting to start (also briefly when an account is posting a lot and Flenvio spaces its posts out). |
PROCESSING | Publishing | Being sent to the platform. With a platformPostId already set, the platform accepted it and is still processing (common for YouTube and TikTok videos). |
COMPLETED | Published | Live on the platform. platformPostId is its id there. If remoteDeletedAt is set, it was later deleted on the platform. |
FAILED | Failed | errorMessage says why. Flenvio retries automatically a few times first (see below), then you can retry it. |
CANCELED | Canceled | A scheduled delivery you canceled. Nothing was published. |
There is no post-level status field. To summarize a post, look at its deliveries: all COMPLETED is published; some COMPLETED and some FAILED is partially published; any SCHEDULED, PENDING or PROCESSING means it isn’t finished.
Automatic retries
When a delivery fails, Flenvio tries again on its own, up to 3 attempts in total, waiting 5 seconds and then longer between them. Between attempts the delivery shows FAILED, so a failure can still turn into PROCESSING and COMPLETED within about a minute. After that, retry it yourself once you’ve fixed the cause. Flenvio refuses to retry a delivery the platform already received (409), because that could post it twice.
Scheduling
Add scheduledAt (an ISO 8601 timestamp, like 2026-10-20T16:00:00Z or 2026-10-20T18:00:00+02:00) to publish later. It must be in the future and at most 365 days ahead. Times less than 5 seconds away publish immediately. Flenvio stores and returns times in UTC; there is no account time zone setting, so always include Z or an offset.
Scheduled posts can be rescheduled or canceled until they start publishing. See Schedule and cancel.
Idempotency
Networks fail. If you send POST /v1/posts and don’t get an answer, you can’t tell whether the post was created. Send an Idempotency-Key header with a value that’s unique to that post (a UUID works well). Sending the same key again returns the original post with status: "duplicate" instead of publishing a second time.
- Keys are per Flenvio account and never expire.
- The key is tied to the request body. Resending the same key with the same body returns the original post (the order of
accountIdsand repeated ids don’t count as differences). The same key with a different body is refused with422andcode: "idempotency_key_reused", and nothing is created. Use a new key for every new post, and the same key only when resending the same request. - Only
POST /v1/poststakes an idempotency key. Other actions are safe to repeat or tell you when there’s nothing left to do.
{
"postId": "b0570000-0000-4000-8000-000000000001",
"status": "duplicate"
}Media
Posts can only use files you uploaded to Flenvio: upload first, then put the returned url in mediaUrls. Links to files elsewhere on the web are rejected. See Upload media.