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.
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/ingestAuthentication
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_keyRequest Body
Send a JSON body with the required system fields and any custom fields defined in your campaign's field mapping.
| Field | Type | Required | Description |
|---|---|---|---|
| flo_campaign_id | string | Yes | The campaign ID to route this lead to. |
| flo_supplier_id | string | Yes | The supplier ID sending this lead. |
| first_name | string | Yes | Lead's first name. |
| last_name | string | Yes | Lead's last name. |
| phone | string | Yes | Lead's phone number. |
| string | Yes | Lead's email address. | |
| state | string | No | Two-letter US state code (used for state-based routing). |
| ...custom fields | varies | Depends | Any 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/pingThe 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.
Buyer Postback Webhook (conversion and lead updates)
Buyers (destinations) push updates on a delivered lead by posting back to the postback webhook. A CRM uses it to mark a lead converted or not qualified, set the conversion revenue, record the deal value, or add a note. The outcome is optional, so you can post revenue on a lead you have sold before its outcome is set (send at least one updatable field).
POST https://app.leaddistro.ai/api/webhooks/buyer-outcomeThere is no /api/v1/outcome endpoint; the URL above is the only postback endpoint. Authenticate with the buyer's webhook secret in the X-Buyer-Secret header (generated on the buyer's Postback Webhook page; this is NOT the supplier x-api-key). One buyer-level URL covers every campaign: the lead is matched from the body by lead_id (the UUID from the original delivery), by phone + campaign_id, by email + campaign_id, or by a custom campaign field such as a click ID (click_id + campaign_id, or match_field + match_value + campaign_id).
curl -X POST https://app.leaddistro.ai/api/webhooks/buyer-outcome \
-H "Content-Type: application/json" \
-H "X-Buyer-Secret: your_buyer_webhook_secret" \
-d '{
"lead_id": "<lead-uuid-from-the-original-delivery>",
"outcome": "converted",
"conversion_revenue": 200,
"lead_value": 750,
"note": "Signed retainer 2026-04-29",
"idempotency_key": "crm-event-12345"
}'| Field | Type | Required | Description |
|---|---|---|---|
| outcome | enum | No | One of pending, converted, not_qualified. Optional: send it to change the lead's status, or leave it out to update revenue, value, or a note only. Other values return 400. |
| lead_id | string | One matching path | Lead UUID from the original delivery (preferred match). |
| phone / email + campaign_id | string | One matching path | Alternative match when lead_id was not stored. |
| click_id + campaign_id | string | One matching path | Matches the lead whose click_id field equals the value you send. Useful for affiliate flows where your buyer tracks clicks, not lead IDs. The campaign must have a click_id field. |
| match_field + match_value + campaign_id | string | One matching path | Match by any other campaign field (for example transaction_id). The field must exist on the campaign; if the value matches more than one lead the request returns 409. |
| conversion_revenue | number | No | The amount paid for this conversion. Sets the lead's revenue on converted and overrides the fixed per-conversion price on file. Also works on a lead that is already converted, so you can add or correct the revenue later. revenue is accepted as an alias. |
| lead_value | number | No | The buyer's own deal value, stored for reporting only. Never affects billing or revenue. |
| note | string | No | Free-text reason, e.g. why a lead was not_qualified. |
| idempotency_key | string | No | Dedupes CRM retries. |
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?
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?
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?
What's the difference between the ingest and ping endpoints?
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?
test_lead: true in the ingest payload on a per-lead basis. Test leads run the full pipeline (field mapping, filters, routing) but deliver only to destinations that are also in Test Mode, carry $0 cost, and are excluded from billing, P&L reports, and Meta CAPI conversion events.How does a buyer report a conversion or rejection back to Lead Distro AI?
POST https://app.leaddistro.ai/api/webhooks/buyer-outcome with the buyer's secret in the X-Buyer-Secret header. Body: outcome (pending, converted, or not_qualified), plus lead_id (or phone/email/click_id + campaign_id, or match_field + match_value + campaign_id) to match the lead. Optional conversion_revenue sets the exact revenue for a converted lead, lead_value records the buyer's own deal value for reporting, and note carries a rejection reason. There is no /api/v1/outcome endpoint.How does the API handle duplicate leads?
DUPLICATE) or routed to the original buyer based on your campaign settings. Outside the window, duplicates are accepted as new leads.Related Articles
If you have any questions, send us an email at support@leaddistro.ai