# Introduction

The PostFlow API lets your code do what the app does: read the connected accounts, bring in photos and videos, draft, check,
schedule and publish posts, answer comments and direct messages, and read analytics. [Webhooks](/guides/webhooks/) tell your
server when something happens. AI assistants use the same features through the [MCP server](/agents/mcp/).

## Base URL

```text
https://postflow.biz.id/api/v1
```

Every endpoint sits under `/v1`. The [OpenAPI 3.1 document](https://postflow.biz.id/api/v1/openapi.json) describes all of them;
import it into Postman, Insomnia, Bruno or a client generator.

## What you need

- A PostFlow workspace with an active subscription or trial. Reading works whatever the subscription status; creating and
  publishing need it active.
- An API key from **Settings → Integrations → API & MCP** (workspace owners), sent as `Authorization: Bearer pf_…`.
  See [Authentication](/concepts/authentication/).

:::caution[Keep the key on your server]
A key can publish to every connected account. Don't put it in browser code, mobile apps or public repositories.
:::

## Conventions

| | |
|---|---|
| Format | JSON in and out (`Content-Type: application/json`), UTF-8. File uploads send raw bytes. |
| Ids | Opaque strings. Don't parse them. |
| Times | ISO 8601 with an offset or `Z` in requests, e.g. `2026-11-03T09:00:00+07:00`. Responses use UTC (`…Z`). |
| Time zone | Each workspace has one (default `Asia/Jakarta`), returned by [`GET /me`](/api/operations/getworkspace/). Calendar days, queue slots and analytics days use it. |
| Errors | `{ "error": { "code", "message", "details" } }` with a matching HTTP status. See [Errors](/concepts/errors/). |
| Pages | Cursors and `before` timestamps. See [Pagination](/concepts/pagination/). |
| Limits | 120 requests a minute per key. See [Rate limits](/concepts/rate-limits/). |

## Concepts

[Authentication](/concepts/authentication/)
  [Permissions](/concepts/permissions/)
  [Rate limits](/concepts/rate-limits/)
  [Errors](/concepts/errors/)
  [Pagination](/concepts/pagination/)
  [Versioning](/concepts/versioning/)
## Endpoints

**Workspace and accounts**
[Workspace](/api/operations/getworkspace/) · [Accounts](/api/operations/listaccounts/) · [Content types](/api/operations/listcontenttypes/)

**Posts**
[Create](/api/operations/createpost/) · [Validate](/api/operations/validatepost/) · [List](/api/operations/listposts/) · [Approve](/api/operations/approvepost/)

**Calendar and queue**
[Calendar](/api/operations/getcalendar/) · [Queue slots](/api/operations/getqueue/) · [Next slot](/api/operations/nextqueueslot/)

**Media**
[Import](/api/operations/importmedia/) · [Upload](/api/operations/uploadmedia/) · [List](/api/operations/listmedia/)

**Inbox**
[Comments](/api/operations/listcomments/) · [Messages](/api/operations/listconversations/)

**Analytics and webhooks**
[Analytics](/api/operations/getanalytics/) · [Webhooks](/api/operations/listwebhooks/)

[Quickstart: a scheduled post in five requests](/quickstart/)