---
title: "List posts"
method: GET
path: "/api/posts"
tags: ["Posts"]
---

# List posts

`GET /api/posts`

## Request

- Base URL: `https://api.dunsocial.com`
- URL: `https://api.dunsocial.com/api/posts`
- Auth: HTTP bearer

## Query parameters

- `status` 'draft' | 'scheduled' | 'published' | 'failed' | 'cancelled'
- `socialAccountId` string
- `groupId` string
- `limit` integer
- `offset` integer

## Headers

- `X-Workspace-Id` string, required

## Response `200`

Paginated posts

- PaginatedPosts
  - `success` true, required
  - `data` object
    - `items` Post[]
      - `id` string, required
      - `status` 'draft' | 'scheduled' | 'published' | 'failed' | 'cancelled'
      - `content` string
      - `scheduledAt` string, nullable
      - `publishedPostUrl` string, nullable
      - `error` string, nullable
      - `groupId` string, nullable
      - `socialAccountId` string
      - `mediaUrls` string[]
    - `total` integer
    - `limit` integer
    - `offset` integer
    - `hasMore` boolean

## Other responses

- `401`: Missing or invalid bearer token
- `402`: Workspace is not on a paid plan
- `403`: Wrong workspace, missing scope, or role

---

[API](https://skmtc.dev/dunsocial/apis/dunsocial-api.md) · [All operations](https://skmtc.dev/dunsocial/apis/dunsocial-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dunsocial/apis/dunsocial-api/revisions/3c586d59e76f?raw)
