# List scheduled posts

> The brand's posts across its accounts: what's coming up, what went live (with its link) and anything that needs the person (a failed post says why). Defaults to the last 7 days and everything ahead.

```http
GET https://yapfactory.com/api/v1/posts
```

|   |   |
| --- | --- |
| Who can use it | Brands |
| Tier | `read`: Reads. Changes nothing. |
| Scope | `posts:read`, or `read` |
| Idempotency-Key | Not used |
| Rate limit | Reads: 120 a minute |
| MCP tool | [`list_posts`](https://yapfactory.com/developers/tools.md#list_posts) |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `status` | query | `"upcoming" \| "live" \| "needs_action" \| "all"` | no | upcoming: not out yet. live: posted. needs_action: stopped and needs the person. Default `"all"`. |
| `from` | query | `datetime` | no | Start of the range (default: 7 days ago). |
| `to` | query | `datetime` | no | End of the range (default: 60 days ahead). |
| `limit` | query | `integer` | no | How many to return. 1 to 50. Default `20`. |
| `cursor` | query | `string` | no | The `nextCursor` from the previous page. Leave out for the first page. |

## Example request

```bash
curl "https://yapfactory.com/api/v1/posts?status=upcoming" \
  -H "Authorization: Bearer $YAP_API_KEY"
```

## Response

`200` with a list. Each item in `data` is what the MCP tool returns in `posts`. Pass `nextCursor` back as `cursor` until `hasMore` is false. [How paging works](https://yapfactory.com/developers/pagination.md).

```json
{
  "data": [
    {
      "id": "92eb5ffe-e6ae-4fec-8ad7-1c4c4e2f8a55",
      "accountId": "0cc175b9-c0f1-46a8-b1c3-99e2697726ae",
      "platform": "tiktok",
      "account": "@sleepwell",
      "status": "scheduled",
      "publishAt": "2026-12-10T18:00:00.000Z",
      "mode": "direct",
      "mediaType": "video",
      "items": 1,
      "caption": "Fell asleep before the alarm app even loaded.",
      "postUrl": null,
      "problem": null,
      "url": "https://yapfactory.com/brand/accounts?tab=calendar&post=92eb5ffe-e6ae-4fec-8ad7-1c4c4e2f8a55"
    }
  ],
  "nextCursor": null,
  "hasMore": false
}
```

An example: fields that don't apply are `null`, and new fields can be added at any time, so ignore ones you don't know. Every response carries `Request-Id` and the `RateLimit-*` headers.

## Errors

| Code | Status | When |
| --- | --- | --- |
| `invalid_request` | 400 | A field failed validation (see `meta.issues`), or an unknown query parameter. |
| `unauthorized` | 401 | No token, or it's wrong, expired, revoked or from the other environment. |
| `insufficient_scope` | 403 | The token doesn't have `posts:read` (or `read`). |
| `forbidden` | 403 | Only for brands, or the account can't do this yet (email not confirmed, paused). |
| `rate_limited` | 429 | Over the limit. Wait for `Retry-After` seconds. |
| `internal` | 500 | Our fault. Retry later, and send us the `requestId` if it keeps happening. |

Every error has the same shape. See [Errors](https://yapfactory.com/developers/errors.md) for what to do about each one.

---

HTML version: https://yapfactory.com/developers/api/list_posts
