Skip to content
Resources

API reference

Send a lead, collect a receipt or check a buyer delivery. Start with the connection your workspace gave you.

Choose your connection

Send leads to LeadRoute over HTTPS and have them validated, deduplicated, and routed to the right buyer in real time. The API uses standard HTTP, JSON payloads, and API key authentication.

Route and deliver: use the v1 supplier webhook with a workspace integration key. This is the default onboarding connection.

Capture with receipts: use a provisioned v2 receipt endpoint with its supplier-only key. Onboarding's “Store without delivery” option uses this path.

Use the URL, key and payload shown by your saved connection. Each connection type has its own key and request body.

Base URL: https://app.leadroute.app

Use the HTTPS host shown in your saved connection. The examples use the hosted LeadRoute app.

Authentication

The v1 ingestion endpoints require a workspace integration API key from an administrator. Workspace administrators manage these in Settings → Integration API keys. Save a newly created key when it appears. It is stored as a hash and cannot be retrieved later. Send it in the x-api-key header:

x-api-key: lr_live_your_api_key_here

The supplier webhook (/api/v1/suppliers/{id}/webhook) requires the same x-api-key header; the key must belong to the supplier's organization.

curl https://app.leadroute.app/api/v1/leads \
  -H "x-api-key: $LEADROUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "email": "jane@example.com", "firstName": "Jane" }'

The JavaScript and Python examples run on your server. Set LEADROUTE_API_KEY in its environment. Treat API keys like passwords. Never expose them in browser-side code or commit them to source control. Rotate immediately if leaked.

Receipt intake

POST /api/v2/sources/:supplierId/receipts

Use this endpoint only when receipt intake is enabled and a receipt connection has been provisioned. Use its supplier-only source key in x-api-key; workspace integration keys and validation-provider keys do not authenticate this endpoint.

The API connection step in onboarding supplies the URL and key for “Store without delivery”. A storage-only contract bypasses routing and sends nothing to buyers. Forwarding contracts, when configured by an administrator, can queue receiver delivery separately.

FieldTypeRequiredDescription
submissionIdstringYesA unique source reference, up to 200 characters. Reuse it only when retrying the same submission and payload.
submittedAtISO 8601 timestampYesThe actual submission time, including a UTC offset or Z.
dataobjectYesLead fields, including a valid email. Custom fields go inside data.customFields. Configured supplier fields may add requirements.
curl -X POST "https://app.leadroute.app/api/v2/sources/YOUR_SUPPLIER_ID/receipts" \
  -H "x-api-key: YOUR_SOURCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "submissionId": "sample-enquiry-001",
  "submittedAt": "2026-01-01T00:00:00.000Z",
  "data": {
    "email": "sample@example.test",
    "firstName": "Sample",
    "customFields": {
      "interest": "battery"
    }
  }
}'

Illustrative payload only. Replace the supplier ID, key, submission reference, timestamp and lead fields. Sending it creates a real receipt and may queue delivery according to the saved contract.

A new receipt returns HTTP 202 with receiptId, leadId, state, reason, receivedAt and duplicate. Save receiptId so your agency can look up the submission. An identical retry returns the existing receipt with HTTP 200; a conflicting payload for the same reference returns HTTP 409. Acceptance of the request does not confirm receiver delivery or CRM creation.

Your agency team can review progress in Leads → Intake receipts. Receipt history and raw-payload access require workspace sign-in; a source key does not grant access to those workspace APIs.

Outcome meanings

Routing-managed leads and receipt-managed submissions have different lifecycles. These are existing recorded states, not extra setup steps. Open either guide to check a recorded state and its meaning.

Lead processing outcomes
Pending pending
Waiting for lead processing.
Validated validated
Passed the configured validation stage; delivery is separate.
Routed routed
A route has been selected; inspect delivery attempts for the receiver result.
Delivered delivered
A successful routing-stage delivery was recorded.
Accepted accepted
A receiver acceptance was recorded for this routing-stage lead.
Rejected rejected
Lead processing rejected this lead. Open it to review the recorded reason.
Flagged flagged
Lead processing flagged this lead for review.
Receipt outcomes
Received received
The submission was captured and is waiting for intake processing.
Stored stored
Stored without forwarding. No buyer delivery was requested.
Rejected rejected
Intake rejected the submission. Review its recorded reason.
Delivery pending delivery_pending
Stored and queued for a receiver delivery attempt.
Needs reconciliation uncertain
The receiver may have accepted it. Check its records before retrying.
Receiver acknowledged delivered
The receiver acknowledged the submission. This does not confirm CRM record creation.
Failed failed
The delivery attempt failed. Review receipt history before deciding what to do.
Historical import imported
Imported as historical data without live routing or delivery.

Webhook Signatures

Inbound requests are authenticated by the x-api-key header — no request signing is required. LeadRoute signs outbound requests when a signing secret is configured, so you can verify that a delivery genuinely came from us.

Verifying outbound webhooks

With a buyer signing secret configured, each signed delivery carries an X-Timestamp header (Unix seconds) and an X-Signature header. The signature is HMAC-SHA256(secret, "<timestamp>." + rawBody) as lowercase hex. Recompute it and compare in constant time — reject the delivery if the timestamp falls outside your freshness window. The examples below use five minutes.

# Inspect a signed fixture using its header and exact body bytes.
# Set TIMESTAMP from X-Timestamp and BUYER_SECRET to the test signing secret.
{ printf '%s.' "$TIMESTAMP"; cat body.json; } | openssl dgst -sha256 -hmac "$BUYER_SECRET"
# In your receiver, check freshness and compare digests in constant time.
POST/api/v1/suppliers/:campaignId/webhook

Submit a Lead via Supplier Webhook

Use the URL in Suppliers → Setup Guide. Send a workspace integration key in the x-api-key header; the supplier ID identifies the source and does not authenticate it. Create a key in Settings → Integration keys and keep it in your server-side automation.

Request body

FieldTypeRequiredDescription
emailstringYesLead email address. Normalized to lowercase.
phonestringNoPhone number. Normalized to E.164 using the supplier country.
firstNamestringNoLead first name.
lastNamestringNoLead last name.
companystringNoCompany name.
addressstringNoStreet address.
citystringNoCity.
statestringNoState or province code.
zipCodestringNoPostal / ZIP code.
countrystringNoTwo-letter country code.
sourcestringNoLead source label. Defaults to "webhook".
ipAddressstringNoEnd-user IP for fraud scoring.
customFieldsobjectNoAny extra supplier-defined fields.

Example

curl https://app.leadroute.app/api/v1/suppliers/CAMPAIGN_ID/webhook \
  -H "Content-Type: application/json" \
  -H "x-api-key: $LEADROUTE_API_KEY" \
  -d '{
    "email": "jane@example.com",
    "firstName": "Jane",
    "lastName": "Doe",
    "phone": "+15551234567",
    "source": "landing-page-a"
  }'

Success response · 201

FieldTypeRequiredDescription
statusstringYesAlways "success" on a 201.
messagestringYesHuman-readable confirmation.
lead_iduuidYesIdentifier of the newly created lead.
validation_resultsobjectYesDetail object with isValid, errors[], warnings[], and per-field results.
routingobjectYesRouting decision: success, routingReason, routeId, routeName and selectedBuyers. A match is not receiver acknowledgment.
quota_warningsstring[]NoPresent when usage crosses 80/90/100% of plan.
JSON response
{
  "status": "success",
  "message": "Lead received and processed",
  "lead_id": "b9f3...c2",
  "validation_results": { "isValid": true, "errors": [], "warnings": [] },
  "routing": { "success": true, "routeId": "...", "selectedBuyers": [{ "buyerId": "..." }] }
}
POST/api/v1/leads

Submit a Lead via API Key

Use the same lead fields and workspace integration key as the supplier webhook. Useful when the source system isn't tied to a single supplier — pass campaignId in the body to target a specific supplier.

curl https://app.leadroute.app/api/v1/leads \
  -H "x-api-key: $LEADROUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "campaignId": "SUPPLIER_ID",
    "email": "jane@example.com",
    "firstName": "Jane",
    "phone": "+15551234567"
  }'

Returns HTTP 200 on success with status, lead_id, validation_results and routing. The response may include quota_warnings.

GET/api/v1/leads/:id

Retrieve a Lead

Fetch a single lead by ID, including validation results, current status, and the assigned route/buyer. Authenticate with your API key.

curl https://app.leadroute.app/api/v1/leads/LEAD_ID \
  -H "x-api-key: $LEADROUTE_API_KEY"

Response · 200

FieldTypeRequiredDescription
iduuidYesLead identifier.
campaignIduuidNoSupplier ID, when a supplier is associated with the lead. The API calls this field campaignId.
emailstringYesLead email (lowercased).
phonestringNoPhone in E.164 format.
firstNamestringNoFirst name.
lastNamestringNoLast name.
companystringNoCompany.
address / city / state / zipCode / countrystringNoPostal address parts.
statusenumYespending | validated | routed | delivered | accepted | rejected | flagged.
scoredecimal(5,2)NoQuality score 0–100.
fraudScoredecimal(5,2)NoFraud risk 0–100 (higher = riskier).
assignedAgentIduuidNoAgent the lead was routed to, if any.
validationResultsobjectNoPer-field validation breakdown.
customFieldsobjectNoSupplier-defined extra fields.
sourcestringNoSource label provided at ingestion.
createdAtISO dateYesServer-side creation timestamp.
JSON response
{
  "id": "b9f3...c2",
  "email": "jane@example.com",
  "phone": "+15551234567",
  "firstName": "Jane",
  "lastName": "Doe",
  "status": "delivered",
  "score": "82.50",
  "campaignId": "...",
  "assignedAgentId": "...",
  "validationResults": { "email": { "valid": true } },
  "createdAt": "2026-05-03T12:00:00.000Z"
}
GET/api/v1/leads

List Leads

List leads scoped to your account. Supports filtering and pagination via query parameters.

Query parameters

FieldTypeRequiredDescription
campaignIduuidNoFilter by supplier ID (campaignId).
statusstringNoOne of pending, validated, routed, delivered, accepted, rejected, flagged.
fromISO dateNoInclusive lower bound on createdAt.
toISO dateNoInclusive upper bound on createdAt.
limitintegerNoPage size, max 200, default 50.
offsetintegerNoPagination offset, default 0.
curl "https://app.leadroute.app/api/v1/leads?status=delivered&limit=25" \
  -H "x-api-key: $LEADROUTE_API_KEY"

Response · 200

FieldTypeRequiredDescription
dataLead[]YesArray of lead objects (same shape as GET /api/v1/leads/:id).
totalintegerYesTotal matching leads (across all pages).
limitintegerYesPage size echoed back.
offsetintegerYesPagination offset echoed back.
JSON response
{
  "data": [ { "id": "...", "email": "...", "status": "delivered" } ],
  "total": 142,
  "limit": 25,
  "offset": 0
}

Errors

Error responses vary by endpoint. Check the HTTP status, a human-readable message, and (where useful) a stable machine-readable code.

HTTP statusCategoryMeaning
400 Bad RequestvalidationBody failed schema validation. Inspect the errors array for field details.
401 UnauthorizedauthCheck the API key type, workspace and endpoint. A signed read request can also fail a timestamp or signature check.
403 ForbiddenpermissionAPI key lacks access to the resource.
404 Not FoundresourceLead, supplier, or other resource does not exist.
409 ConflictduplicateA v1 lead matched a duplicate. Receipt intake also returns 409 when a reference is reused with a different payload.
422 Unprocessable EntitybusinessLead suppressed or failed validation rules.
429 Too Many Requestsrate-limitRate or plan limit hit. See codes LEAD_LIMIT_REACHED, LIFETIME_LIMIT_REACHED.
500 Internal Server ErrorserverUnexpected error. Check whether the submission was recorded before retrying. For receipt intake, reuse the same reference and unchanged payload.

Example error body

JSON response
{
  "status": "error",
  "message": "Monthly lead limit reached for your plan",
  "code": "LEAD_LIMIT_REACHED"
}

Rate Limits

Two layers of limits apply: a request-rate limit per API key, and a per-plan lead quota. Both surface as 429 Too Many Requests.

Per-key request rate

600 requests / minute per API key by default across the public /api/v1 endpoints. Deployment configuration may change this limit. Standard rate-limit headers (RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset) describe the applicable request limit. Dashboard requests use a separate per-IP budget.

Plan lead quotas

PlanMonthly priceLead allowance
Free TrialFree25 leads total. No expiry or monthly reset. Returns LIFETIME_LIMIT_REACHED once consumed.
StarterUS$79 / mo1,000 leads / month.
GrowthUS$249 / mo5,000 leads / month.
ProfessionalUS$499 / mo20,000 leads / month.
EnterpriseUS$999 / mo100,000 leads / month.

Need more headroom? Compare plans and allowances

Need help? hello@leadroute.io