Pagination

Cursor-based pagination for stable, consistent list traversal.

List endpoints use cursor pagination with stable ordering by
(created_at desc, id desc), so results don't shift when new records are added.

Request

ParameterDescription
limitPage size, 1-100 (default 25)
cursorOpaque cursor from the previous response's next_cursor

Response envelope

{
  "object": "list",
  "data": [ /* resources */ ],
  "has_more": true,
  "next_cursor": "MTcxOTg0..."
}

Paging through all results

cursor=""
while :; do
  resp=$(curl -s "https://api.zentag.app/api/v1/partner/clips?limit=100&cursor=$cursor" \
    -H "Authorization: Bearer $ZENTAG_SECRET_KEY")
  echo "$resp" | jq -c '.data[]'
  more=$(echo "$resp" | jq -r '.has_more')
  cursor=$(echo "$resp" | jq -r '.next_cursor // empty')
  [ "$more" = "true" ] && [ -n "$cursor" ] || break
done

Did this page help you?