Pagination & Filtering

The pagination query parameters and response envelope shared by every list endpoint in the HookSentry API.

Every endpoint that lists a collection (invites, users, destinations, senders, API keys, events) shares the same pagination query parameters and the same response envelope.

Query parameters

ParameterTypeDefaultDescription
Qtinteger10Items per page
Pginteger1Page number, 1-based
CpOrdstringidSort field, case-insensitive — must be a real property of the resource
TpOrdAsc | DescDescSort direction

Each resource page in this reference lists any additional filter parameters it accepts (for example Status on Users, or From/To on Events).

Response envelope

{
  "total": 42,
  "items": [
    // ...page of resource objects
  ]
}
  • total — total number of matching items across all pages, not just the current page
  • items — the current page, sized by Qt (or fewer, on the last page)

Example

var url = "https://api.hooksentry.com/api/v1/events?Qt=25&Pg=2&CpOrd=acceptedAt&TpOrd=Desc";

var request = new HttpRequestMessage(HttpMethod.Get, url);
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);

using var client = new HttpClient();
var response = await client.SendAsync(request);

Invalid sort field:

Passing a CpOrd value that isn't a real property of the resource returns 400 Bad Request.