Developers
The Enrichment API
Call the same vendor waterfall and trust scoring the pixel uses, with identifiers you already hold. Every response carries a trust tier, per-field provenance and the vendor spend it cost.
POST /api/v1/enrich
Authenticate with Authorization: Bearer <api_key>. Keys are created in the console under API keys and shown exactly once — only a hash and a display prefix are stored.
POST /api/v1/enrich
Authorization: Bearer ld_live_...
Content-Type: application/json
{
"identifiers": {
"email": "dana@northwind.com",
"phone": "+1 512 555 0148",
"full_name": "Dana Whitfield",
"location": "Austin, TX 78704",
"employer": "Northwind Outfitters",
"domain": "northwind.com"
},
"purpose": "marketing",
"corroboration": "tier_b",
"fields": ["social_profiles", "employment", "location"],
"callback_url": "https://yourapp.com/hooks/leadsdata"
}{
"request_id": "0f0a…",
"trust_tier": "A",
"confidence": 0.94,
"matched_on": ["email", "name+employer"],
"corroborated_by": ["People Data Labs", "Apollo"],
"profile": { "full_name": "Dana Whitfield", "employer": "Northwind Outfitters", "city": "Austin" },
"provenance": [
{ "field": "employer", "value": "Northwind Outfitters",
"source": "People Data Labs", "agreed_by": ["Apollo"], "conflicts": [] }
],
"cost_credits": 3,
"vendors_called": ["People Data Labs", "Apollo"],
"cached": false
}Trust tiers
- A — two independent source families agree on the same person anchor. Cleared for email, SMS, CRM and ads.
- B — one deterministic anchor, such as the email you supplied. Email and ads; SMS only once the phone verifies as mobile.
- C — a single uncorroborated, household-level guess. Ad audiences only.
- conflict — sources disagree on last name, state or email. Blocked from everything and retained only for audit.
Set corroboration to any, tier_b or tier_a. If the result lands below what you asked for we return the real tier and an empty profile. A caller asking for Tier A never receives a Tier C guess dressed up as a match.
Resolution order
Identifier strength is email > phone > name + employer > name + location. The waterfall runs in that order and stops the moment your requested tier is satisfied, so a strong identifier costs less.
Employment purpose — restricted mode
Employment-purpose lookups may constitute a consumer report under the Fair Credit Reporting Act. You are responsible for obtaining candidate consent and for issuing adverse action notices where required. A key cannot be granted the employment purpose until this is acknowledged in the console.
- Minimum corroboration is forced to Tier B, whatever you request.
- Protected characteristics are stripped everywhere — age or date of birth, marital status, religion, political affiliation, ethnicity, gender, national origin, disability, pregnancy and any inferred household or demographic segment. Not in
profile, not inprovenance. - Returned: name, current and past employers with titles and dates, education, city and state, LinkedIn and professional profile URLs.
- The response carries
restricted: trueandwithheld_field_categories. - Name + location alone is never used for an employment lookup — we return
trust_tier: "C"with an explanation instead. - Every employment lookup is written to an immutable audit table.
curl -sS https://leadsdata.com/api/v1/enrich \
-H "Authorization: Bearer $LEADSDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"identifiers": { "full_name": "Dana Whitfield", "employer": "Northwind Outfitters" },
"purpose": "employment"
}'Caching and cost
Results are cached per workspace against a hash of the strongest identifier, default TTL 30 days and overridable per org. A cache hit calls no vendor and bills no vendor cost — it returns cached: true and cache_age_days. Spend is tracked per request and broken down by purpose, caller and vendor on the usage view.
Async mode
Supply callback_url and the call returns 202 with a request_id immediately. The completed result is POSTed to your URL, signed with your key's signing secret.
const expected = crypto
.createHmac("sha256", SIGNING_SECRET)
.update(rawBody)
.digest("hex");
// header: x-leadsdata-signature: sha256=<expected>Quick start
curl -sS https://leadsdata.com/api/v1/enrich \
-H "Authorization: Bearer $LEADSDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"identifiers": { "email": "dana@northwind.com" },
"purpose": "marketing",
"corroboration": "tier_b"
}'Accuracy Lab — verified truth intake
Add the LeadsData visitor ID to a hidden form field, then send verified customer details from your server to POST /api/public/v1/truth using an admin-issued key with truth:write scope. Never put that key in the browser. Include site_id, source_system, external_id and captured_at. Repeated source_system + external_id values update the existing record. Raw details are encrypted; blind benchmarks never alter customer resolution or activation.
<!-- Browser: run when the pixel has loaded, before form submission -->
<input type="hidden" name="visitor_id" id="ld-visitor-id" />
<script>
document.querySelector('form').addEventListener('submit', function () {
document.getElementById('ld-visitor-id').value =
window.superpixel?.visitorId || '';
});
</script>
// Server only: after verifying the booking/customer record
await fetch('https://leadsdata.com/api/public/v1/truth', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.LEADSDATA_TRUTH_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
site_id: YOUR_LEADSDATA_SITE_ID,
source_system: 'detroit_barbers_booking',
external_id: booking.id,
visitor_id: submittedForm.visitor_id || null,
first_name: booking.firstName,
last_name: booking.lastName,
email: booking.email,
phone: booking.phone,
street: booking.street,
city: booking.city,
state: booking.state,
postal: booking.postal,
captured_at: new Date().toISOString()
})
});