Data API
The Data API lets you pull all of your lead data into Snowflake, BigQuery, or any data warehouse on your own schedule. Instead of receiving one webhook per lead, you call our API whenever you want and get back everything new since your last pull.
The Data API is an Enterprise feature. If you would like it enabled, contact your account manager or our support team.
What it's used for
- Sync leads into a data warehouse (Snowflake, BigQuery, Redshift, Databricks) so they sit next to the rest of your business data.
- Power BI dashboards and reporting from one source of truth instead of exporting CSVs.
- Feed reverse-ETL tools like Fivetran, Airbyte, or Hightouch with a clean, predictable source.
- Keep your own backup of every lead in your data lake.
What you get for each lead
Every record contains the same rich data your webhooks send, using stable field names, plus a few things webhooks cannot give you:
- Every form answer, with the original question text alongside it (for example
stateandstate_question). - Verification and validation results (email, phone), lead scoring, gamification, and consent records.
- Click-fraud and bot-detection results, plus compliance links (TrustedForm, Jornaya, session recordings).
- A
deliveriesarray with the actual API response from the tools you distribute leads to,. - A
_metaobject with the lead id, funnel id, and timestamps.
How it works
The Data API is pull-based. You call it on a schedule and pass a cursor so you only get what changed since last time.
- Call
GET /v1/data/leadswith no cursor for your first pull. - Save the
next_cursorfrom the response. - On the next run, pass it as
sinceto get only new and changed leads. - Store each lead in your warehouse, matching on
lead_idso updated leads overwrite rather than duplicate.
A lead can reappear with a newer timestamp when it is enriched or re-verified, so always upsert (merge) on
lead_id.
Getting started
1. Create an API key
Go to Settings → Developer in your dashboard and click Create API key. Copy the key (it starts with lc_live_ ). For security, we only show it once, so store it somewhere safe. You can revoke a key at any time from the same screen.
2. Make your first call
Use your key in the Authorization header:
curl -H "Authorization: Bearer lc_live_your_key" \ "https://my.leadcapture.io/api/v1/data/leads?limit=500&include=deliveries"
You will get back:
{
"data": [ /* your leads */ ],
"next_cursor": "eyJ1Ijoi...",
"has_more": true
}
Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/data/leads |
A page of leads, ordered by cursor |
| GET | /v1/data/leads?since=<cursor> |
Everything changed since your last poll |
| GET | /v1/data/leads/{id} |
A single lead, with its delivery responses |
Useful query parameters: limit (1 to 1000, default 500), funnel_id to restrict to one funnel, and include=deliveries to include the distribution-tool responses.
Using Postman
If your team prefers a visual tool, we provide a Postman collection:
- In Settings → Developer, click Download Postman collection.
- Import the file into Postman.
- Set the collection variable
base_urltohttps://my.leadcapture.io/apiandapi_keyto your key. - Open List leads (first pull) and click Send.
- Copy the
next_cursorinto thecursorvariable and run List leads (incremental) to fetch what changed.
We also provide an OpenAPI spec (also under Settings → Developer) if you want to generate your own client.
Snowflake quickstart
A common setup is a scheduled job that polls the API and merges into a target table:
- Create a table with a
lead_idcolumn and aVARIANTcolumn for the lead JSON (Snowflake parses JSON natively). - Run a scheduled Task (or your own loader) that calls the API, passing the cursor you saved last run.
MERGEonlead_idso updated leads overwrite instead of duplicating.- Save the returned
next_cursorfor the next run.
How far back you can pull is bounded by your plan's lead-retention window.
Rate limits and best practices
- Responses include
X-RateLimit-*headers so you can pace your requests. - Poll on a sensible interval (for example every few minutes) rather than in a tight loop.
- Always merge on
lead_id, and always advance your cursor fromnext_cursor.
Need help, or want a custom pipeline?
Our team can help you stand up your first warehouse sync and can build a custom pipeline for your stack. Reach out to your account manager or contact support and we will get you set up.