---
title: "List posts and drafts newest first"
description: "PubNio API posts.list: list posts and drafts newest first. Request fields, examples in five clients, errors, and idempotency."
---

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

# List posts and drafts newest first

List posts and drafts newest first with [`GET /api/v1/posts`](https://pubnio.com/api/v1/docs#tag/posts/GET/api/v1/posts). Requires an API key with the `read` scope or a signed-in workspace member.

## Request

Includes drafts and submitted posts. Filter with isDraft, deliveryStatus, accountId, or profileId. Rows carry a short text preview; the full content is on [`GET /api/v1/posts/{postId}`](https://pubnio.com/api/v1/docs#tag/posts/GET/api/v1/posts/{postId}).

| Parameter        | In    | Type                | Required |
| ---------------- | ----- | ------------------- | -------- |
| `workspaceId`    | query | UUID                | Yes      |
| `isDraft`        | query | `"true"`, `"false"` | No       |
| `accountId`      | query | UUID                | No       |
| `profileId`      | query | UUID                | No       |
| `cursor`         | query | string              | No       |
| `limit`          | query | string              | No       |
| `deliveryStatus` | query | one of 9 strings    | No       |

## Response

- HTTP 200: `PostList` with `data`, `hasMore`, `nextCursor`.

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const drafts = await workspace.posts.list({ isDraft: true, limit: 20 });
```

### Python

```python
drafts = workspace.posts.list(is_draft=True, limit=20)
```

### cURL

```sh
curl "https://pubnio.com/api/v1/posts?workspaceId=$WORKSPACE_ID&isDraft=true&limit=20" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
```

### CLI

```sh
pnio posts list --draft --limit 20
```

### MCP execute

```js
async () => {
  const response = await codemode.request({
    method: "GET",
    path: "/api/v1/posts",
    query: { workspaceId: codemode.workspaceId, isDraft: true, limit: 20 },
  });
  return response.data;
};
```

## Errors

It declares no problem of its own.

It declares the problems [most operations](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

None needed: a read is safe to retry.

## Limits

- Up to 100 items a page; pass `nextCursor` back as `cursor`. See [Pagination](https://pubnio.com/docs/concepts/pagination/).

## Related

- [Posts operations](https://pubnio.com/docs/reference/#posts)
- [Publishing](https://pubnio.com/docs/publishing/)
- [Post lifecycle](https://pubnio.com/docs/concepts/post-lifecycle/)

Source: https://pubnio.com/docs/reference/posts-list/index.mdx
