Skip to content

Pagination

All list endpoints (/wins, /spaces, /tags) support pagination.

ParameterTypeDefaultRangeDescription
pageinteger11+Page number
per_pageinteger251–100Items per page

Pagination metadata is returned in response headers:

HeaderTypeDescription
X-Total-CountintegerTotal number of records matching the query
X-PageintegerCurrent page number
X-Per-PageintegerItems per page
Terminal window
curl "https://app.myhypedoc.com/api/v1/wins?page=2&per_page=10" \
-H "Authorization: Bearer YOUR_TOKEN"
X-Total-Count: 47
X-Page: 2
X-Per-Page: 10

The response body contains items 11–20 of 47 total.

To determine the total number of pages:

total_pages = ceil(X-Total-Count / X-Per-Page)

For the example above: ceil(47 / 10) = 5 pages.

  • page values below 1 are clamped to 1
  • per_page values are clamped to the range 1–100
  • Requesting a page beyond the last page returns an empty array
  • The default per_page of 25 works well for most use cases