Skip to content

List posts and drafts newest first

PubNio API posts.list: list posts and drafts newest first. Request fields, examples in five clients, errors, and idempotency.

List posts and drafts newest first with 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}.

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 has each field’s type.

Examples

const drafts = await workspace.posts.list({ isDraft: true, limit: 20 });
drafts = workspace.posts.list(is_draft=True, limit=20)
curl "https://pubnio.com/api/v1/posts?workspaceId=$WORKSPACE_ID&isDraft=true&limit=20" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
pnio posts list --draft --limit 20
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 declare.

Idempotency

None needed: a read is safe to retry.

Limits

  • Up to 100 items a page; pass nextCursor back as cursor. See Pagination.

Type to search…

↑↓ navigate↵ selectEsc close