Pagination
Read list endpoints page by page with a cursor.
List endpoints return items newest first, in pages.
| Parameter | Default | Meaning |
|---|---|---|
limit | 20 | Items per page, from 1 to 100. |
starting_after | none | The 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
| Code | Cause |
|---|---|
invalid_cursor | starting_after is not a cursor the API returned. |
invalid_request | limit is not a whole number from 1 to 100. |