Skip to main content
Every list endpoint is cursor-paginated. There are no OFFSET/page=N parameters, because they get linearly slower as you go deeper. Duro uses keyset cursors so every page is equally cheap.

Request

GET /v1/customers?limit=20
GET /v1/customers?limit=20&cursor=cus_01HKBZ4PQ9Z3K7
ParamDefaultMaxNotes
limit20100Page size.
cursorThe nextCursor from the previous page. Omit for the first page.

Response

{
  "items": [ /* … */ ],
  "nextCursor": "cus_01HKBZ4PQ9Z3K7",
  "hasMore": true
}
  • items — the page, newest first (createdAt desc, id desc).
  • nextCursor — pass this as cursor to get the next page. null on the last page.
  • hasMoretrue if another page exists.

Iterating

cursor=""
while :; do
  resp=$(curl -s "$DURO_API/v1/customers?limit=100&cursor=$cursor" -H "Authorization: Bearer $DURO_KEY")
  # …process items…
  cursor=$(echo "$resp" | jq -r '.nextCursor')
  [ "$cursor" = "null" ] && break
done
Cursors are ordered on a (createdAt, id) compound index, so the query plan is identical whether you’re on page 1 or page 1,000.