Hubhus
ToolsAgent loginSubmit a ticket
All articles

Integrations / API

API: Reading and filtering leads

Published 28. sep. 2026, 16.40

TL;DR

GET https://api.leadvalidator.dk/leads?campaign_id={id} with Authorization: Bearer {token} . Filter with query params: filter[status]=contacted , filter[updated_after]=2025-01-01 , filter[source]=partner-west . Paginate with &page=2 . Use filter[updated_after] for incremental sync.

Pull lead data from Hubhus into any external CRM, ERP, BI tool, or automation platform using the Hubhus REST API.

4 things to know

  1. Basic GET request. You need your API token and campaign ID (visible in the URL: campaigns/362/... → id = 362).
  2. Filtering with query parameters. All filters use AND logic. Select field values use their slug, not label.
  3. Pagination. Results are paginated. The response includes pagination.total_pages. Fetch additional pages with ?page=2 or increase the page size with per_page, e.g. ?page=2&per_page=100.
  4. Best practices. Use updated_after for incremental sync instead of full fetches. Use campaign-scoped tokens for external vendors. Read slugs from live API documentation - never hardcode manually. Implement retry/backoff for large pulls. Log API errors - they explain exactly what failed.
Read more - response format and advanced filters

Pagination response structure

{
  "data": [...],
  "pagination": {
    "page": 1,
    "per_page": 50,
    "total": 143,
    "total_pages": 3
  }
}

Loop through pages until page = total_pages.

Practical examples

Incremental sync - updated in last 24 hours

GET /leads?campaign_id=362&filter[updated_after]=2025-02-21T00:00:00Z

All "new" leads from a specific partner

GET /leads?campaign_id=362&filter[status]=new&filter[source]=partner-north

Page 3 with 100 leads per page

GET /leads?campaign_id=362&page=3&per_page=100

Official API resources

Always use the live API documentation for the current field list - the exact structure depends on your campaign schema.

api
get
leads
sync
Didn't find the answer? Submit a ticket and we'll get back to you as soon as possible.