Letterby Docs

Pagination

Read list endpoints page by page with a cursor.

List endpoints return items newest first, in pages.

ParameterDefaultMeaning
limit20Items per page, from 1 to 100.
starting_afternoneThe next_cursor from the previous page.
{
  "data": [{ "id": "019a…" }],
  "has_more": true,
  "next_cursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTEx…"
}

Keep requesting with starting_after set to next_cursor until has_more is false. Treat the cursor as an opaque string.

Read every page

curl "https://api.letterby.com/v1/payouts?limit=100" \
  -H "Authorization: Bearer $LETTERBY_API_KEY"

curl "https://api.letterby.com/v1/payouts?limit=100&starting_after=$NEXT_CURSOR" \
  -H "Authorization: Bearer $LETTERBY_API_KEY"

Errors

CodeCause
invalid_cursorstarting_after is not a cursor the API returned.
invalid_requestlimit is not a whole number from 1 to 100.

On this page