How do I read/get leads via API?
If you need to pull lead data from Hubhus into an external CRM, ERP, BI tool, or automation platform, you can use the Hubhus REST API.
On this page
Jump to any section using the links below
Reading lead data from Hubhus via API
If you need to pull lead data from Hubhus into an external CRM, ERP, BI tool, or automation platform, you can use the Hubhus REST API.
This article explains how to authenticate, how GET requests work, how to filter results, and how pagination is handled.
1. Before you start
Table of Contents
- 1. Before you start
- 2. Basic GET request for leads
- 3. Filtering leads in API requests
- ✔ Filter by status slug
- ✔ Filter by creation date
- ✔ Filter by updated date
- ✔ Filtering by select values
- ✔ Combine multiple conditions (AND logic)
- 4. Pagination
- 5. Understanding the response format
- 6. Practical examples
- Fetch all leads updated in last 24 hours:
- Fetch all “new” status leads from a specific partner:
- Fetch leads with pagination:
- 7. Best practices
- Summary
To read leads via the API, you need:
Your API token
Found under either:
Campaign → API documentation → API Tokens (recommended, scoped), or
Account → API documentation (broad access).
Your campaign ID
Visible in the URL when you’re inside a campaign:https://yourdomain/campaigns/362/... → campaign_id = 362
Official API documentation
General API docs:
https://leadvalidator.dk/docs/
OpenAPI specification:
https://leadvalidator.dk/docs/download/openapi.yaml/hubhus-openapi.yaml
Postman collection:
https://leadvalidator.dk/docs/download/collection.json/hubhus-postman-collection.json
2. Basic GET request for leads
The base structure is:
Example:
This returns an array of leads from campaign 362, limited by:
Your permissions
Any campaign filter applied to the token
API tokens scoped to a campaign filter will only return leads matching that filter.
3. Filtering leads in API requests
You can filter leads using query parameters supported in the API documentation.
Common examples:
✔ Filter by status slug
✔ Filter by creation date
✔ Filter by updated date
✔ Filtering by select values
Select field values must be sent using their slug.
✔ Combine multiple conditions (AND logic)
❗ Filters follow the structure defined in the API documentation.
Always confirm which fields and slugs exist in your campaign.
4. Pagination
Hubhus API returns paginated results to ensure performance.
Typical structure:
To fetch additional pages:
Or increase page size (if supported):
5. Understanding the response format
A lead object includes:
Lead ID
Status (slug + label)
All fields with values
Select fields with their slug
Assigned person
Timestamps (created, updated)
Any associated metadata permitted by your token
Important:
The exact structure depends on the campaign schema.
Always use the live API documentation for the correct field list.
6. Practical examples
Fetch all leads updated in last 24 hours:
Fetch all “new” status leads from a specific partner:
Fetch leads with pagination:
7. Best practices
✔ Use campaign-scoped tokens when working with external vendors
✔ Always read slugs from the live documentation, not manually
✔ Implement retry/backoff for large pulls
✔ Avoid fetching entire campaigns frequently
✔ Use updated_after filtering for incremental sync
✔ Log API errors — the API explains exactly what failed
Summary
To read leads via Hubhus API, you:
Get your API token
Identify the campaign ID
Send a GET request to
/campaigns/{id}/leadsApply filters as needed
Use pagination for large datasets
Validate the response against the campaign schema
This provides a reliable and scalable way to sync Hubhus data into any external system.
? Common searches
api setup • api integration • webhook setup • api authentication
? Also known as
customer • contact • prospect • integration
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article