Developers

Pagination

The list endpoints page with opaque cursors, not page numbers. It's the Stripe/GitHub model: keyset (seek) pagination on a stable sort, so inserts mid-scroll never skip or duplicate rows the way offset paging does.

The envelope

Every list endpoint returns the same shape:

json
{
  "data": [ /* … up to "limit" items, newest first … */ ],
  "has_more": true,
  "next_cursor": "eyJ0IjoiMjAyNi0wNi0yOFQwOToxNDoyMi4xMDFaIiwiaSI6IjlmM2EifQ"
}
FieldTypeMeaning
dataarrayThis page of items, sorted newest-first.
has_morebooleantrue when at least one more page exists.
next_cursorstring | nullPass back as ?cursor= to fetch the next page. null on the last page (when has_more is false).

Query parameters

ParameterDefaultNotes
limit25Page size, clamped to 1–100. Values outside that range fall back to 25.
cursorNoneThe next_cursor from the previous response. Omit it for the first page.

Walking the pages

bash
# First page: 50 items, no cursor
curl "https://postme.live/api/v1/posts?limit=50" \
  -H "Authorization: Bearer pml_live_..."

# Next page: feed back the next_cursor verbatim
curl "https://postme.live/api/v1/posts?limit=50&cursor=eyJ0IjoiMjAyNi0wNi0yOFQwOToxNDoyMi4xMDFaIiwiaSI6IjlmM2EifQ" \
  -H "Authorization: Bearer pml_live_..."

Loop until the server stops handing you a cursor:

text
cursor = null
loop:
  page = GET /posts?limit=100  (+ &cursor=<cursor> if set)
  process page.data
  if not page.has_more: stop
  cursor = page.next_cursor

Cursors are opaque

  • Treat the cursor as a black box. It encodes the last row's sort key; the exact contents are an implementation detail and may change. Don't parse, build, or mutate one; only echo back what we gave you.
  • It's per-query. A cursor only makes sense against the same endpoint and the same filters. Don't carry one from GET /posts to GET /media, or across a change of filter.
  • No total count. There's no page count or grand total; the keyset model trades that for skip-free, duplicate-free paging under concurrent writes. Use has_more to decide whether to keep going.

Which endpoints paginate

The collection endpoints use this scheme: GET /posts and GET /media.

GET /channels and GET /workspaces return a data array but aren't cursor-paginated. Channels are hard-capped per plan, and a key sees exactly one workspace, so each always fits in a single response.

Pagination: Public API