> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postsyncer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Core concepts

> Workspaces, accounts, posts, content items, platform rows, post statuses, timezones and who a key acts as.

Every endpoint uses the same few objects. A workspace holds accounts and posts. A post holds its content and one platform row per account it goes to.

```text theme={null}
Workspace          Halden Coffee, timezone Europe/London
├── Accounts       X @haldencoffee, Instagram, LinkedIn page, ...
└── Posts
    ├── content    the post, then thread items, then an optional first comment
    └── platforms  one row per account, each with its own status
```

## Workspaces

A workspace is one brand or client. It has its own accounts, posts, media, brand and `timezone`. Most requests name one with `workspace_id`. [`GET /workspaces`](https://docs.postsyncer.com/api-reference/workspaces/list) lists the workspaces your key reaches.

## Accounts

An account is one connected social profile in one workspace: an X account, a Facebook page, a Telegram channel. Its `platform` is one of 12 values:

| Network | `platform` | Network | `platform` |
| - | - | - | - |
| X | `twitter` | Pinterest | `pinterest` |
| Instagram | `instagram` | Threads | `threads` |
| Facebook | `facebook` | Bluesky | `bluesky` |
| LinkedIn | `linkedin` | Mastodon | `mastodon` |
| TikTok | `tiktok` | Telegram | `telegram` |
| YouTube | `youtube` | Google Business Profile | `google_business` |

When `needs_reconnect` is `true`, the network refused the account's sign-in. A scheduled or published post leaves that account out and lists it in `skipped_accounts`. A draft keeps it. Someone reconnects it in the app or with a [connect link](https://docs.postsyncer.com/api-reference/accounts/connect-link.md).

## Posts

A post is one piece of content sent to one or more accounts at one time. `schedule_type` says what a save does:

| `schedule_type` | What happens | Key needs |
| - | - | - |
| `draft` | Saved in PostSyncer. Nothing goes out. | `posts:create` (or `posts:update`) |
| `schedule` | Goes out at `schedule_for`. Left out, a new post, or one whose time has passed, takes the workspace's next free queue slot, and an update keeps a time that is still ahead. With no slot free, it's refused with `422` and nothing is saved, unless your role can't publish: then it waits for approval, and the approver picks the time. | also `posts:schedule` |
| `publish_now` | Goes out right away. | also `posts:publish` |

A new post has `content_version` 1, and each update adds 1. Send the version you read back on an update: if someone changed the post since, the API answers `409` instead of overwriting their edit. Leave it out and the update always goes through.

### Content items

`content` is a list:

* The first item is the post.
* More items make a thread on X, Threads, Bluesky and Mastodon. Every other network gets the items joined into one text.
* One item can have `is_first_comment: true`. It's posted under the post: as a comment on Facebook, Instagram, LinkedIn and YouTube, and as a reply at the end of the thread on X, Threads, Bluesky and Mastodon. `first_comment_delay` is a number of minutes. TikTok, Pinterest, Telegram and Google Business Profile have no first comment.

Each item has `text`, `media` (media library ids or links) or both.

### Platform rows

`platforms` holds one row per account the post goes to, in the order the accounts were added. A row has the network's `settings` and its own `status`:

| Row `status` | Meaning | Extra fields |
| - | - | - |
| `PENDING` | Not sent yet. | |
| `IN_PROGRESS` | Being sent. | `progress` |
| `PUBLISHED` | Live on the network. | `post_url`, `analytics` |
| `FAILED` | The network refused it. | `error_message` |

## Post statuses

A post's `status` follows its rows. The API returns statuses in uppercase.

| Status | Meaning | What comes next |
| - | - | - |
| `DRAFT` | Saved, not going out. | Schedule it or publish it now. If your role can't publish, it goes to `PENDING_APPROVAL` instead. |
| `SCHEDULED` | Goes out at `scheduled_at`. | `IN_QUEUE` at that time. |
| `PENDING_APPROVAL` | Someone whose role can't publish scheduled it or published it now. | An approver approves it to schedule, to publish now or as a draft ([`POST /posts/{id}/approve`](https://docs.postsyncer.com/api-reference/posts/approve) or the app), or rejects it in the app. |
| `REJECTED` | An approver turned it down. It's back with its writer. | Edit it and send it again: it waits for approval again. |
| `IN_QUEUE` | Due, waiting to be sent. Creating with `publish_now` answers this. | `IN_PROGRESS` |
| `IN_PROGRESS` | Being sent to the networks. | One of the three below. |
| `PUBLISHED` | Every row is `PUBLISHED`. | |
| `PARTIALLY_FAILED` | Some rows are `PUBLISHED`, some `FAILED`. | Fix and send the failed rows again. |
| `FAILED` | Every row is `FAILED`. | Fix and send it again. |

```mermaid theme={null}
flowchart LR
  DRAFT -->|schedule| SCHEDULED
  DRAFT -->|publish_now| IN_QUEUE
  DRAFT -->|"schedule or publish_now, role can't publish"| PENDING_APPROVAL
  PENDING_APPROVAL -->|approved to schedule| SCHEDULED
  PENDING_APPROVAL -->|approved to publish now| IN_QUEUE
  PENDING_APPROVAL -->|approved as a draft| DRAFT
  PENDING_APPROVAL -->|rejected| REJECTED
  REJECTED -->|sent again| PENDING_APPROVAL
  SCHEDULED -->|its time| IN_QUEUE
  IN_QUEUE --> IN_PROGRESS
  IN_PROGRESS --> PUBLISHED
  IN_PROGRESS --> PARTIALLY_FAILED
  IN_PROGRESS --> FAILED
```

[Webhooks](https://docs.postsyncer.com/api-reference/webhooks/overview.md) tell you when a post is published, partly published or fails, so you don't have to poll.

## Timezones

* Each workspace has a `timezone`, an IANA name such as `Europe/London`.
* `schedule_for.date` and `schedule_for.time` are read in the workspace's timezone.
* To give one post's time in another zone, add `schedule_for.timezone`, for example `"America/New_York"`. It applies to that post only and never changes the workspace's timezone. An unknown name answers `422`.
* Post times in answers (`scheduled_at`, `created_at`, `updated_at`) are in the workspace's timezone, written `Y-m-d H:i` with no offset, such as `2030-03-15 09:00`. `posted_on`, on the post and on each platform row, is a list of those times, one for each time it went out. It's empty until then.

## Who a key acts as

A key acts as the person it belongs to. It reaches every workspace that person owns or joined, and in each one it can do only what their role there allows:

* An owner, manager or content manager can publish.
* A content creator's scheduled and publish-now posts wait as `PENDING_APPROVAL`.
* A client can't create posts.

The key's permissions narrow this further. A key with `posts:create` but without `posts:schedule` and `posts:publish` can only save drafts, even for an owner. See [Authentication](https://docs.postsyncer.com/essentials/authentication.md).

## Related

> [card] [Quickstart](https://docs.postsyncer.com/quickstart.md)
>
> Draft, schedule and check a post.

> [card] [Create a post](https://docs.postsyncer.com/api-reference/posts/create.md)
>
> Every field of a post request.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.