DocsAPI ReferenceLead Ingest API

Lead Ingest API

Complete Lead Distro AI API reference. Ingest leads via REST endpoints with field validation, signed webhooks, authentication, rate limits, and full example requests for every lead distribution endpoint.

Last updated:

Lead Ingest API

Send leads into Lead Distro AI using a simple POST request. Leads are validated against your campaign's field mapping, checked against inbound filters and suppression lists, then distributed to buyers automatically.

Endpoint

POST https://app.leaddistro.ai/api/v1/ingest

Authentication

Include your supplier's API key in the x-api-key header. You can find this in the supplier detail page.

x-api-key: your_supplier_api_key

Request Body

Send a JSON body with the required system fields and any custom fields defined in your campaign's field mapping.

FieldTypeRequiredDescription
flo_campaign_idstringYesThe campaign ID to route this lead to.
flo_supplier_idstringYesThe supplier ID sending this lead.
first_namestringYesLead's first name.
last_namestringYesLead's last name.
phonestringYesLead's phone number.
emailstringYesLead's email address.
statestringNoTwo-letter US state code (used for state-based routing).
...custom fieldsvariesDependsAny additional fields defined in your campaign's field mapping.

Example Request

curl -X POST https://app.leaddistro.ai/api/v1/ingest \
  -H "Content-Type: application/json" \
  -H "x-api-key: your_supplier_api_key" \
  -d '{
    "flo_campaign_id": "campaign_abc123",
    "flo_supplier_id": "supplier_xyz789",
    "first_name": "John",
    "last_name": "Doe",
    "phone": "5551234567",
    "email": "john@example.com",
    "state": "TX"
  }'

Response

On success the API returns the created lead with its assigned buyer and status.

{
  "data": {
    "id": "lead_id",
    "status": "ACCEPTED",
    "buyer_id": "buyer_abc",
    "campaign_id": "campaign_abc123"
  }
}

If no buyer is available (all caps filled, no matching state filters, etc.), the lead status will be UNMATCHED instead of ACCEPTED.

Ping-Post Mode

For ping-post campaigns, use the separate ping endpoint to check buyer availability before committing the lead.

POST https://app.leaddistro.ai/api/v1/ping

The ping endpoint returns available buyers and their bid prices without creating a lead. You then post the full lead to the ingest endpoint with the chosen buyer.

Frequently Asked Questions

What is the Lead Distro AI ingest endpoint URL?
POST https://app.leaddistro.ai/api/v1/ingest. Authenticate with your supplier API key in the x-api-key header. Required JSON body fields: flo_campaign_id, flo_supplier_id, first_name, last_name, phone, email. Add any custom fields defined in your campaign's field mapping. Response is JSON with the created lead's id, status, and assigned buyer_id.
How do I authenticate API requests to Lead Distro AI?
Include your supplier's API key in the x-api-key request header. Each supplier in Lead Distro AI gets a unique API key generated automatically on creation — find it on the supplier detail page. Keep the key server-side; never expose it in client-side JavaScript or commit it to public repositories. If a key is compromised, delete the supplier and create a new one to rotate.
What HTTP status codes does the ingest API return?
201 Created when the lead is accepted and distributed. 200 OK with status: UNMATCHED when the lead passes validation but no buyer is available. 400 Bad Request for missing required fields or invalid field formats. 401 Unauthorized when the API key is missing or invalid. 403 Forbidden when the supplier is not linked to the specified campaign. 422 Unprocessable Entity when the lead fails campaign inbound filters or suppression checks. 429 Too Many Requests if you exceed the rate limit.
Are there rate limits on the ingest API?
Yes. Default limit is 100 requests per second per supplier API key, with burst allowance up to 200 RPS for 10 seconds. High-volume agencies can request higher limits — contact support. The ping endpoint has a separate, more generous limit since pings are lighter than full posts.
What's the difference between the ingest and ping endpoints?
Ingest creates a real lead record and triggers distribution to buyers. Ping is a pre-check that validates lead data against filters and buyer availability without creating a record — useful for ping-post campaigns where suppliers want to know if a lead will be accepted before sending the full data. A successful ping returns a signed ping_id token (valid 30 min) that the supplier includes in the subsequent ingest call as flo_ping_id.
Does the API support test mode?
Yes. Mark a supplier as Test Mode in its settings — every ingest call from that supplier is treated as a test, distributed normally to all configured buyers, but flagged with is_test: true and excluded from billing, P&L reports, and Meta CAPI conversion events. Use Test Mode to validate field mappings, webhook delivery, and buyer routing before going live.
How does the API handle duplicate leads?
Each campaign has a configurable duplicate detection window (default: 30 days). Duplicates are detected by phone, email, or custom fields you specify. Within the window, a duplicate is either rejected (status: DUPLICATE) or routed to the original buyer based on your campaign settings. Outside the window, duplicates are accepted as new leads.

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