# List posts

Returns posts, one page at a time.

```http
GET https://api.pozy.ai/v1/posts
```

- Area: Publishing / Posts
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `page` (integer)
- `limit` (integer)
- `offset` (integer)
- `cursor` (string)
- `fields` (string)
- `updatedSince` (string (date-time))
- `source` (string): one of pozy, external
- `status` (string): one of draft, pending_approval, scheduled, publishing, published, partial, failed, cancelled
- `platform` (string)
- `profileId` (string)
- `createdBy` (string)
- `fromDate` (string (date))
- `toDate` (string (date))
- `dateFrom` (string (date))
- `dateTo` (string (date))
- `includeHidden` (boolean)
- `search` (string)
- `tags` (string)
- `sortBy` (string): one of scheduled-desc, scheduled-asc, created-desc, created-asc, status, platform
- `accountId` (string)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/posts?limit=10" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/posts?limit=10", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/posts",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "limit": 10,
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `posts`, array of object
  - `_id`, string
  - `userId`, string or object
    - one of: string
    - one of: User
      - `_id`, string
      - `email`, string
      - `name`, string
      - `role`, string
      - `disabledResourceGroups`, array of string
      - `createdAt`, string (date-time)
  - `title`, string
  - `content`, string
  - `mediaItems`, array of object
    - `type`, string: One of `image`, `video`, `gif`, `document`
    - `url`, string (URL)
    - `fileId`, string
    - `accountId`, string
    - `title`, string
    - `altText`, string
    - `filename`, string
    - `size`, integer
    - `mimeType`, string
    - `thumbnail`, string (URL)
    - `instagramThumbnail`, string (URL)
    - `subtitles`, array of object: Up to 20 items
      - `url`, string (URL), required
      - `language`, string, required
    - `tiktokProcessed`, boolean
  - `platforms`, array of object
    - `platform`, string
    - `accountId`, string or object
      - one of: string
      - one of: Social Account
        - `_id`, string, required
        - `platform`, string, required: One of `tiktok`, `instagram`, `facebook`, `youtube`, `linkedin`, `twitter`, `threads`, `pinterest`, `reddit`, `bluesky`, `googlebusiness`, `telegram`, `snapchat`, `discord`, `slack`, `whatsapp`, `shopify`, `wordpress`, `wix`, `linkedinads`, `metaads`, `pinterestads`, `tiktokads`, `xads` and 15 more
        - `profileId`, string or object, required
          - one of: string
          - one of: Profile
            - `_id`, string
            - `userId`, string
            - `name`, string
            - `description`, string
            - `color`, string
            - `timezone`, string: Can be null
            - `externalId`, string: Can be null
            - `isDefault`, boolean
            - `isOverLimit`, boolean
            - `accountCount`, integer
            - `createdAt`, string (date-time)
        - `username`, string
        - `displayName`, string
        - `platformUserId`, string
        - `scopeAreas`, array of string: Can be null
        - `oauthAppId`, string: Can be null
        - `tiktokAccountType`, string: One of `business`, `personal`, `unknown`
        - `profilePicture`, string: Can be null
        - `profileUrl`, string
        - `isActive`, boolean, required
        - `needsReconnection`, boolean
        - `followersCount`, number
        - `followersLastUpdated`, string (date-time)
        - `parentAccountId`, string: Can be null
        - `enabled`, boolean
        - `rateLimitedUntil`, string (date-time): Can be null
        - `metadata`, object
    - `customContent`, string
    - `customMedia`, array of object
      - `type`, string: One of `image`, `video`, `gif`, `document`
      - `url`, string (URL)
      - `fileId`, string
      - `accountId`, string
      - `title`, string
      - `altText`, string
      - `filename`, string
      - `size`, integer
      - `mimeType`, string
      - `thumbnail`, string (URL)
      - `instagramThumbnail`, string (URL)
      - `subtitles`, array of object: Up to 20 items
        - `url`, string (URL), required
        - `language`, string, required
      - `tiktokProcessed`, boolean
    - `scheduledFor`, string (date-time)
    - `platformSpecificData`, object
    - `status`, string
    - `platformPostId`, string
    - `platformPostUrl`, string: Can be null
    - `publishedAt`, string (date-time)
    - `removedFromPlatformAt`, string (date-time): Can be null
    - `isTrialReel`, boolean
    - `trialGraduationStrategy`, string: One of `MANUAL`, `SS_PERFORMANCE`
    - `publishAttempts`, integer
    - `publishRetries`, integer
    - `errorMessage`, string
    - `errorCategory`, string: One of `auth_expired`, `user_content`, `user_abuse`, `account_issue`, `platform_rejected`, `platform_error`, `platform_rate_limit`, `quota_exhausted`, `system_error`, `unknown`
    - `errorSource`, string: One of `user`, `platform`, `system`
    - `platformError`, object
      - `code`, integer
      - `subcode`, integer
      - `message`, string, required
  - `scheduledFor`, string (date-time)
  - `timezone`, string
  - `status`, string: One of `draft`, `pending_approval`, `scheduled`, `publishing`, `published`, `partial`, `failed`, `cancelled`
  - `tags`, array of string
  - `hashtags`, array of string
  - `mentions`, array of string
  - `visibility`, string: One of `public`, `private`, `unlisted`
  - `metadata`, object
  - `recycling`, object
    - `enabled`, boolean
    - `gap`, integer
    - `gapFreq`, string: One of `week`, `month`
    - `startDate`, string (date-time)
    - `expireCount`, integer
    - `expireDate`, string (date-time)
    - `contentVariations`, array of string
    - `contentVariationIndex`, integer
    - `recycleCount`, integer
    - `nextRecycleAt`, string (date-time)
    - `lastRecycledAt`, string (date-time)
  - `recycledFromPostId`, string
  - `queuedFromProfile`, string
  - `queueId`, string
  - `createdAt`, string (date-time)
  - `updatedAt`, string (date-time)
- `pagination`, object
  - `page`, integer
  - `limit`, integer
  - `total`, integer
  - `pages`, integer
  - `nextCursor`, string: Can be null

```json
{
  "posts": [
    {
      "_id": "635d87e261ae344ef27fd1df",
      "userId": "6da95b9455a22c1e061837af",
      "title": "Launch day",
      "content": "Hello from Pozy",
      "mediaItems": [
        {
          "type": "image",
          "url": "https://pozy.ai/media/example-1.jpg",
          "fileId": "6035bf6bd3aac3067c336c50",
          "accountId": "696e0b682d0a31188e7a2ba9",
          "title": "Launch day",
          "altText": "Hello from Pozy",
          "filename": "photo.jpg",
          "size": 482133,
          "mimeType": "image/jpeg",
          "thumbnail": "https://pozy.ai/media/example-1.jpg",
          "instagramThumbnail": "https://pozy.ai/media/example-1.jpg",
          "subtitles": [
            {
              "url": "https://pozy.ai/media/example-1.jpg",
              "language": "en"
            }
          ],
          "tiktokProcessed": true
        }
      ],
      "platforms": [
        {
          "platform": "instagram",
          "accountId": "696e0b682d0a31188e7a2ba9",
          "customContent": "Hello from Pozy",
          "customMedia": [
            {
              "type": "image",
              "url": "https://pozy.ai/media/example-1.jpg",
              "fileId": "6035bf6bd3aac3067c336c50",
              "accountId": "696e0b682d0a31188e7a2ba9",
              "title": "Launch day",
              "altText": "Hello from Pozy",
              "filename": "photo.jpg",
              "size": 482133,
              "mimeType": "image/jpeg",
              "thumbnail": "https://pozy.ai/media/example-1.jpg",
              "instagramThumbnail": "https://pozy.ai/media/example-1.jpg",
              "subtitles": [
                {}
              ],
              "tiktokProcessed": true
            }
          ],
          "scheduledFor": "2026-10-02T09:00:00.000Z",
          "platformSpecificData": {},
          "status": "active",
          "platformPostId": "637f799b3039e6602e83fa4f",
          "platformPostUrl": "https://pozy.ai/media/example-1.jpg",
          "publishedAt": "2026-10-02T09:00:00.000Z",
          "removedFromPlatformAt": "2026-10-02T09:00:00.000Z",
          "isTrialReel": true,
          "trialGraduationStrategy": "MANUAL",
          "publishAttempts": 1,
          "publishRetries": 1,
          "errorMessage": "Hello from Pozy",
          "errorCategory": "auth_expired",
          "errorSource": "user",
          "platformError": {
            "code": 1,
            "subcode": 1,
            "message": "Hello from Pozy"
          }
        }
      ],
      "scheduledFor": "2026-10-02T09:00:00.000Z",
      "timezone": "America/New_York",
      "status": "draft",
      "tags": [
        "string"
      ],
      "hashtags": [
        "string"
      ],
      "mentions": [
        "string"
      ],
      "visibility": "public",
      "metadata": {},
      "recycling": {
        "enabled": true,
        "gap": 1,
        "gapFreq": "week",
        "startDate": "2026-10-02T09:00:00.000Z",
        "expireCount": 42,
        "expireDate": "2026-10-02T09:00:00.000Z",
        "contentVariations": [
          "Hello from Pozy"
        ],
        "contentVariationIndex": 1,
        "recycleCount": 42,
        "nextRecycleAt": "2026-10-02T09:00:00.000Z",
        "lastRecycledAt": "2026-10-02T09:00:00.000Z"
      },
      "recycledFromPostId": "6786dd4f9a1815d922da3579",
      "queuedFromProfile": "string",
      "queueId": "6a5f84bc69bcee401578bb47",
      "createdAt": "2026-10-02T09:00:00.000Z",
      "updatedAt": "2026-10-02T09:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 1,
    "total": 42,
    "pages": 1,
    "nextCursor": "string"
  }
}
```
