Skip to content

Guides

API pagination guide: filtering and idempotency in SkedCast

This API pagination guide covers how every list endpoint in SkedCast's API uses keyset (cursor) pagination instead of page numbers, and why every mutating request requires an Idempotency-Key. Both exist for the same reason: correctness under concurrent writes, not just convenience.

Browse docs

5 min read

API pagination guide: why keyset, not offset#

Offset pagination (?page=3) breaks under concurrent writes: if a row is inserted or deleted while you're paging through, you can see a row twice or skip one entirely, and it gets slower the deeper you page. Keyset pagination follows a cursor derived from the last row you saw, so it stays correct and fast at any depth.

bash
curl "https://api.skedcast.com/v1/posts?limit=50&cursor=eyJ…" \
  -H "Authorization: Bearer sked_live_YOUR_KEY"
json
{
  "data": [ { "object": "post", "id": "…" } ],
  "page": { "cursor": null, "nextCursor": "eyJ…", "hasMore": true },
  "meta": { "correlationId": "c-…" }
}
The list envelope — iterate until hasMore is false.

Filtering#

Most list endpoints accept status/client/platform filters as ordinary query params alongside limit and cursor — see the specific resource's table in the full API reference for exactly which filters it supports.

Idempotency on writes#

Every POST, PATCH, and DELETE needs an Idempotency-Key header — any unique string, a UUID is simplest. Replaying the same key returns the original result instead of creating a duplicate, so a network retry after a timeout is always safe. A different body under the same key is a 409 conflict, not silently accepted.

paginationidempotencyfiltering

FAQ

Can I jump to a specific page number?
No — keyset pagination has no concept of a page number, only "the next batch after this cursor". If you need a specific slice, filter more narrowly (by date range or status) instead of trying to skip ahead.
What happens if I reuse an Idempotency-Key with a different request body?
A 409 conflict (idempotency key reuse) — the handler never runs a second time. Generate a fresh key for each logically distinct request.

Ready to broadcast everywhere?

Sign up free — no credit card. You land on the Free plan, and you can start a one-time 7-day Studio trial from your workspace whenever you are ready. Connect your first accounts, import a batch, and watch one post fan out across every platform.