Pagination
House of Apps API uses two different pagination methods depending on the endpoint. Most list endpoints use page-based pagination, while some specialized endpoints use cursor-based pagination.
Page-Based Pagination
Most list endpoints (e.g., /v1/integrations/leads, /v1/integrations/clients/contacts) use page and page_size parameters to paginate through results. For example, the first three pages for the lead resource (100 records per page) are:
- Page 1:
/v1/integrations/leads?page=1&page_size=100 - Page 2:
/v1/integrations/leads?page=2&page_size=100 - Page 3:
/v1/integrations/leads?page=3&page_size=100
The response contains data with the list of objects, along with total, page, page_size, and total_pages, which indicate if you reached the last page.
The default page_size is 20 and the maximum is 100. You will get a 422 response with an appropriate message if you exceed it.
Endpoints that accept filters in a JSON body (e.g., POST /v1/integrations/leads/list) take the pagination parameters in the body instead. See each endpoint’s documentation for the exact parameter names.
Deep Pagination
If you’re planning to iterate through a long list of results (for example, all leads or contacts within your organization), make sure each pass returns a manageable set of results.
A popular method to do this is to use a date range, such as start_date and end_date on POST /v1/integrations/leads/list, and make multiple requests while moving the date window.
Cursor-Based Pagination
Some endpoints use cursor-based pagination instead of page-based. With cursors, you pass a cursor token from the previous response to fetch the next page of results. This avoids issues with data changing between requests.
The following endpoints use cursor-based pagination:
- Ticket conversation - uses
cursorandlimitquery parameters, withnext_cursorreturned in the response
See each endpoint’s documentation for specific pagination details.