# listPosts — Postify API

`GET /v1/posts`

List posts. Lists the organization's posts, newest first, with cursor pagination. Each post carries its per-channel variants and latest delivery outcomes.

- Required scope: `posts:read`
- Auth: `Authorization: Bearer postify_live_…` or `x-api-key` header

## Parameters

- `limit` (query, integer) — Page size (1–100).
- `after` (query, string) — Opaque cursor from a previous page's `next_cursor`.
- `status` (query, "draft" | "scheduled" | "publishing" | "published" | "failed" | "needs_approval") — Filter by lifecycle state.

## Responses

- `200` — One page of posts. (schema: `PostList`)
- `400` — [`invalid_request`](https://usepostify.com/docs/api/problems/invalid-request.md), [`validation_failed`](https://usepostify.com/docs/api/problems/validation-failed.md)
- `401` — [`authentication_required`](https://usepostify.com/docs/api/problems/authentication-required.md), [`invalid_api_key`](https://usepostify.com/docs/api/problems/invalid-api-key.md)
- `403` — [`insufficient_scope`](https://usepostify.com/docs/api/problems/insufficient-scope.md), [`feature_not_enabled`](https://usepostify.com/docs/api/problems/feature-not-enabled.md)
- `429` — [`rate_limited`](https://usepostify.com/docs/api/problems/rate-limited.md), [`quota_exhausted`](https://usepostify.com/docs/api/problems/quota-exhausted.md)
- `500` — [`internal_error`](https://usepostify.com/docs/api/problems/internal-error.md)

Errors are RFC 9457 `application/problem+json` with a stable `code` and a `request_id`. Full schemas: [interactive reference](https://usepostify.com/docs/api-reference) · [OpenAPI spec](https://app.usepostify.com/v1/openapi.json).

## Example (curl)

```bash
curl https://app.usepostify.com/v1/posts \
  -H "Authorization: Bearer postify_live_XXXXXXXXXXXXXXXX"
```

## Example (TypeScript)

```ts
const res = await fetch("https://app.usepostify.com/v1/posts", {
  headers: {
    Authorization: `Bearer ${process.env.POSTIFY_API_KEY}`,
  },
});

if (!res.ok) {
  // RFC 9457 problem+json: branch on the stable `code`.
  const problem = await res.json();
  throw new Error(`${problem.code}: ${problem.detail ?? problem.title}`);
}
const data = await res.json();
```
