DocsIntegrationsLead Validator: Enrich Leads From Your Own API

Lead Validator: Enrich Leads From Your Own API

Call your own enrichment or validation API on every lead before it is sent, save what it returns into campaign fields, and send those values to your destinations, filter on them, or price on them. Works on Direct Post campaigns.

Last updated:

What It Does

The Lead Validator lets you plug in any API you already use to check or enrich leads, even one we have no built-in integration for. Every time a lead arrives, Lead Distro AI sends the fields you choose to your API, reads the values you pick out of its answer, and saves them into campaign fields before the lead is sent to your destinations. From there they behave like any other field: you can put them in a destination's POST body, filter destinations on them, and set pricing on them.

You can also give it a pass rule, for example "only pass leads the API marks as valid", and decide what happens when the API is down or the lead fails the rule.

The Lead Validator is a Labs feature. If you do not see it under Settings → Integrations, turn on Lead Validator in Settings → Labs, or ask our support team to switch it on for you.

Common Uses

  • Add data your destinations ask for. Household income, credit band, property details, or a lead score from your own model, sent along with the lead.
  • Route on your own data. Send high-income leads to one destination and the rest to another, using a destination filter on the enriched field.
  • Price on your own data. Charge more for leads your API grades highly, using conditional pricing on the enriched field.
  • Stop bad leads before they are sent. Use a pass rule with Block lead so a lead your API rejects never reaches a destination.

Before You Start

  • An API endpoint that accepts a GET or POST request and answers with JSON.
  • The API's login details, if it needs any: an API key (sent as a header or a query parameter), a bearer token, or a username and password.
  • One sample response from the API, so you know where each value you want sits in the answer.

Step 1: Add Your API

  • Go to Settings → Integrations → Lead Validator and click Add validator.
  • Give it a Name, paste your Endpoint URL, and choose POST or GET.
  • Pick how your API logs in: No auth, API key (header), API key (query param), Bearer token, or Basic (user:pass), and enter the key or password.
  • Under Request mapping, add each lead field you want to send and the name your API expects for it. For example, send phone as phone_number and zip_code as zip.

Step 2: Choose What to Keep From the Answer

Under Response mapping, add one row for each value you want. On the left, type where the value sits in your API's answer, using dots to step into nested objects. On the right, give it a short output name. You will pick this output name in Step 4.

For example, if your API answers like this:

{
  "valid": true,
  "result": {
    "income_band": "75k-100k",
    "homeowner": true
  }
}
Response path (left)Output name (right)
result.income_bandincome_band
result.homeownerhomeowner
validis_valid

Click Test before you save. It calls your API with a sample lead and shows the values it read from the answer, so you can check your response paths.

Step 3: Set a Pass Rule and What Happens on Failure (Optional)

  • Pass rule. Leave it empty if you only want to enrich leads. To gate leads, add conditions on the answer, for example valid equals true, and choose Match all or Match any.
  • On failure. Choose what happens when your API errors, times out, or the lead fails the pass rule. Pass through sends the lead anyway (recommended while you are setting up). Block lead stops it: the lead is marked Rejected with the reason "Blocked by Lead Validator" and is not sent.
  • Daily limit. Caps how many leads are sent to your API per day. When it is reached, leads keep flowing without the lookup until the next day.

Click Create to save. Then click Campaigns next to the validator and turn it on for each campaign that should use it.

Step 4: Save the Values Into Campaign Fields

  • Open your campaign and go to the Fields tab.
  • Edit the field that should hold the value, or add a new one (for example income_band).
  • Under Fill from your Lead Validator, pick the output name from Step 2.
  • Save the field. Repeat for each value you want to keep.

If your source already sent a value for that field, Lead Distro AI keeps the source's value and does not overwrite it.

Step 5: Send It to Your Destinations

Add the field to your destination's POST body like any other field, for example:

{
  "phone": "{{phone}}",
  "email": "{{email}}",
  "income_band": "{{income_band}}"
}

You can also use the field in destination filters (for example, only send leads where income_band is 100k+) and in conditional pricing.

Step 6: Send a Test Lead

Use Send Test Lead on the campaign. The test lead goes through your API just like a real lead. Open the lead and check that the field is filled in, then open the destination's delivery log to see the value in the POST body your destination received.

Good to Know

  • Direct Post campaigns only. On a Ping Post campaign the lead is offered to destinations right away, so the values are saved on the lead but may not be in that delivery.
  • Your API adds time to each lead. Destinations get the lead after your API answers. If it has not answered within 8 seconds, the lead continues as set in On failure.
  • Your API provider bills you directly. Lead Distro AI adds no charge for the lookups.

Frequently Asked Questions

Can I send data from my own API to my destinations?
Yes. Add your API under Settings → Integrations → Lead Validator, map the values you want out of its answer, then on the campaign's Fields tab pick each value under Fill from your Lead Validator. The value is saved on the lead before it is sent, so you can add it to the destination's POST body like any other field.
Will the enriched value overwrite data my source sent?
No. If the source already sent a value for that field, Lead Distro AI keeps it. The Lead Validator only fills a field that arrived empty.
What happens if my API is down?
It depends on the On failure setting. Pass through sends the lead without the enriched values. Block lead stops the lead and marks it Rejected with the reason Blocked by Lead Validator.
Does it work on Ping Post campaigns?
It is built for Direct Post campaigns. On a Ping Post campaign the lead is offered to destinations right away, so the values are saved on the lead but may not reach that delivery.
Can I use more than one API?
Yes. Add a validator for each API and turn each one on for the campaigns that need it. Each field picks which validator and value fills it.

If you have any questions, send us an email at support@leaddistro.ai