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

# API overview

> Write, schedule and design LinkedIn content from your own tools with the PostChamp REST API: base URL, conventions and what you can call.

The PostChamp API lets your own systems write posts, schedule them, manage content styles, and create carousels and infographics. Calls run as the person who created the API key, with that person's current role. They spend your organization's credits at the same prices as the app.

> [!NOTE]
>
> The API is on the Studio plan. Owners create keys in **Settings → API keys**.

## Base URL and versioning

* **Base URL:** `https://api.postchampai.com`
* **Version:** every path starts with `/api/v1`. For example, `https://api.postchampai.com/api/v1/key`.
* **Authentication:** send your key (it starts with `pc_live_`) in the `x-api-key` header. See [Authentication](/api/authentication.md).
* **OpenAPI document:** [https://api.postchampai.com/api/v1/openapi.json](https://api.postchampai.com/api/v1/openapi.json). It needs no key. The **Endpoints** pages of this tab are generated from it.

```bash
curl https://api.postchampai.com/api/v1/key \
  -H "x-api-key: pc_live_xxx"
```

## Conventions

> [accordion] JSON in, JSON out
>
> Send `Content-Type: application/json` with a body. Answers are JSON. Request bodies are strict: a field the endpoint does not know is rejected with `validation_error`.

> [accordion] Ids
>
> Workspaces, posts, carousels, slides and infographics use UUIDs. Content styles use a string id: `preset:story` for built-in styles, a UUID for your own. Job ids are strings such as `carousel-build:<carouselId>:0`. Use them as given.

> [accordion] Timestamps
>
> Timestamps are ISO 8601 in UTC, for example `2026-12-07T09:00:00.000Z`. When you schedule a post you can send `scheduledAt` (with an offset or `Z`) or `localDateTime` (`YYYY-MM-DDTHH:mm`, read in the workspace time zone).

> [accordion] Lists
>
> List endpoints answer `{ "items": [...], "nextCursor": "..." }`. Pass `nextCursor` back as `cursor`. See [Pagination](/api/pagination.md).

> [accordion] Errors
>
> Every error has the shape `{ "error": { "code", "message", "details" } }`. Branch on `code`, not on `message`. See [Errors](/api/errors.md).

> [accordion] Request ids
>
> Every answer has an `X-Request-Id` header (for example `req_fn2x5hKvjNmFUdZH`). Server errors (5xx) also carry it in `details.requestId`. Send it to support when you ask about a call.

> [accordion] Workspaces
>
> Most paths contain `/workspaces/{workspaceId}`. Call `GET /api/v1/key` to list the workspaces your key reaches. A workspace the key cannot reach answers `404 not_found`.

## What you can do

| Area | What it covers |
| - | - |
| Account | Describe the key, read the credit balance, list carousel templates. |
| Posts | Generate 1 to 3 versions or 5 variations, save your own text, list, read, edit, delete, read the timeline. |
| Scheduling | Schedule a post, cancel its schedule. |
| Content styles | List, create, update and archive styles and their example posts. |
| Carousels | Create and change carousels. These are jobs: you poll or stream them. |
| Infographics | Create, edit, list, read and delete. Also jobs. |
| Jobs | Read a job's state, or stream its progress over server-sent events. |

Calls that spend credits need an `Idempotency-Key` header so a retry never charges twice. See [Idempotency](/api/idempotency.md).

## Limits

A key can make 120 requests a minute, with tighter windows for generation. See [Rate limits](/api/rate-limits.md).

## No SDK yet

There is no official SDK. The API is plain JSON over HTTPS, and the OpenAPI document generates a client in most languages. For example:

```bash
bunx @hey-api/openapi-ts -i https://api.postchampai.com/api/v1/openapi.json -o ./postchamp-client
```

Every recipe in this tab shows plain `fetch` and `requests` code you can copy instead.

## Next steps

> [card] [Quickstart](/api/quickstart.md)
>
> Create a key, generate a post and schedule it in four calls.

> [card] [Authentication](/api/authentication.md)
>
> Create, scope and revoke keys.

> [card] [Errors](/api/errors.md)
>
> Every status and error code, and what to do.

> [card] [Recipes](/api/recipes/generate-and-schedule.md)
>
> Complete scripts in JavaScript, Python and curl.

> [card] [MCP server](/mcp/overview.md)
>
> Prefer an AI assistant? Connect it over MCP instead of using keys.
