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 state   and state_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 deliveries   array with the actual API response from the tools you distribute leads to,.
  • A _meta   object 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.

  1. Call GET /v1/data/leads   with no cursor for your first pull.
  2. Save the next_cursor   from the response.
  3. On the next run, pass it as since   to get only new and changed leads.
  4. Store each lead in your warehouse, matching on lead_id   so 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:

  1. In Settings → Developer, click Download Postman collection.
  2. Import the file into Postman.
  3. Set the collection variable base_url   to https://my.leadcapture.io/api   and api_key   to your key.
  4. Open List leads (first pull) and click Send.
  5. Copy the next_cursor   into the cursor   variable 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:

  1. Create a table with a lead_id   column and a VARIANT   column for the lead JSON (Snowflake parses JSON natively).
  2. Run a scheduled Task (or your own loader) that calls the API, passing the cursor you saved last run.
  3. MERGE   on lead_id   so updated leads overwrite instead of duplicating.
  4. Save the returned next_cursor   for 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 from next_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.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.