Pagination

One envelope for every list: items, totalCount, page, pageSize, totalPages.

Every list endpoint pages the same way and answers in the same envelope — learn it once.

Request

ParameterDefaultBounds
page11-based
pageSize501–100
curl -s "https://webhookvault.dev/api/v1/endpoints/$EP_ID/requests?page=2&pageSize=25" \
  -H "Authorization: Bearer $WV_KEY"

Response

{
  "items": [  ],
  "totalCount": 1204,
  "page": 2,
  "pageSize": 25,
  "totalPages": 49
}
  • items is ordered newest first everywhere.
  • totalCount counts everything the query matches, not just this page — after filters are applied.
  • An out-of-range page returns an empty items, never an error; totalPages tells you where the end is.

Walking new arrivals without pages

For "give me everything since I last looked" flows, prefer afterId over paging: pass the largest request id you've already processed and only newer requests come back. Ids are strictly increasing, so this is race-free where time filters aren't.

curl -s ".../requests?afterId=$LAST_SEEN_ID&pageSize=100" -H "Authorization: Bearer $WV_KEY"

Where next?

  • listRequests — all filters, combined with AND
  • Errors — what a failed call looks like

On this page