Skip to main content
List endpoints support pagination to handle large result sets efficiently.

Pagination Parameters

ParameterTypeDefaultDescription
pageinteger0Page number (0-indexed)
sizeinteger10Number of results per page (1-100)

Example Request

curl -X GET "https://api.withallo.com/v1/api/contacts?page=0&size=20" \
  -H "Authorization: Api-Key YOUR_API_KEY"

Response Metadata

Paginated responses include metadata about the current page:
{
  "data": {
    "results": [...],
    "metadata": {
      "pagination": {
        "total_pages": 5,
        "current_page": 0
      }
    }
  }
}

Iterating Through Pages

To retrieve all results, increment the page parameter until you reach total_pages:
let currentPage = 0;
let totalPages = 1;

while (currentPage < totalPages) {
  const response = await fetch(
    `https://api.withallo.com/v1/api/contacts?page=${currentPage}&size=100`,
    { headers: { "Authorization": "Api-Key YOUR_API_KEY" } }
  );
  
  const data = await response.json();
  totalPages = data.data.metadata.pagination.total_pages;
  
  // Process data.data.results
  
  currentPage++;
}