On this page:Overview
api reference

Screen a lead in one request.

LeadFilter analyzes an inbound message and returns a spam-likelihood score, a verdict, and a plain-English reason. Send lead text from any form, CRM webhook, automation, or internal tool.

POST/v1/leads/analyze

Overview

The LeadFilter API is a screening layer for inbound leads. You send the raw message text (plus any context you have), and LeadFilter responds with a score, a verdict, a short reason, and matched categories.

LeadFilter is conservative by design. It estimates how spam-like a message is — it does not decide whether a lead is valuable, and it never deletes anything. You stay in control of what happens to each result.

  • One JSON endpoint, one predictable response shape.
  • Every result includes a request_id for auditing, support, and debugging.
  • Works with contact forms, CRM webhooks, automations, and internal tools.

Quick start

Create an account, add your business context, generate an API key, then send your first lead. Here's a complete request and response:

analyze-lead.sh
# Analyze an inbound lead curl https://api.leadfilter.zsetup.com/v1/leads/analyze \ -H "content-type: application/json" \ -H "x-api-key: $LEADFILTER_API_KEY" \ -d '{ "lead": { "text": "Boost your DA with 5,000 backlinks...", "email": "sales@example.com", "company": "Example Growth", "source": "website_form", "country": "US" }, "external_id": "crm_12345" }'
response.json
// 200 OK { "request_id": "lfreq_...", "score": 94, "verdict": "likely_spam", "confidence": 0.92, "reason": "This message appears to be an SEO outreach pitch.", "categories": ["seo_pitch", "link_building"], "processed_at": "2026-05-30T20:00:00.000Z" }

Authentication

Authenticate every request with an API key in the x-api-key header. Create and manage keys from your dashboard — when you generate a key, the full secret is shown once, so copy it then.

header
x-api-key: lfai_live_••••••••••••••••
Keep keys server-side. Never place API keys in URLs, query strings, or frontend browser code. Call LeadFilter from your backend, form handler, or automation — not from the client.

Analyze a lead

POSThttps://api.leadfilter.zsetup.com/v1/leads/analyze

Submit an inbound message for screening. The only required field is lead.text; everything else is optional context that can sharpen the result. A successful call returns 200 OK with the screening result.

Request fields

FieldTypeDescription
lead.textstringRequiredThe raw inbound message to screen.
lead.emailstringOptionalSender's email address, if you have it.
lead.companystringOptionalCompany name associated with the lead.
lead.sourcestringOptionalWhere the lead came from, e.g. website_form.
lead.countrystringOptionalTwo-letter country code, e.g. US.
external_idstringOptionalYour own reference, such as a CRM record ID.
metadataobjectOptionalArbitrary key/values stored alongside the check.

Response fields

FieldTypeDescription
request_idstringUnique ID for this check. Cite it for support and debugging.
scoreintegerSpam likelihood from 0100. Higher means more spam-like.
verdictstringOne of likely_legit, needs_review, likely_spam.
confidencenumberModel confidence in the verdict, from 0 to 1.
reasonstringShort, human-readable explanation of the result.
categoriesstring[]Matched pattern categories, e.g. seo_pitch.
processed_atstringISO-8601 timestamp of when the check ran.

Understanding verdicts

Every result maps to one of three verdicts. They describe how spam-like a message is — not whether it's a good fit for your business.

likely_legit

Reads like a genuine inquiry. Safe to route straight into your pipeline.

needs_review

Ambiguous or low-confidence. Flagged for a human rather than dropped — intentionally. Send these to a review queue.

likely_spam

Matches well-known outreach and spam patterns. Hold, tag, or archive on your terms — it's never deleted automatically.

needs_review is a feature, not a fallback. When LeadFilter isn't confident, it says so — so a real opportunity isn't thrown away by a machine.

Understanding the score

The score is a spam-likelihood estimate from 0 to 100. A 100 means very likely spam, fake, irrelevant, or non-actionable; lower scores look more like genuine inquiries.

Thresholds for each verdict are configurable per account, so you decide where needs_review begins and ends. A low-confidence result can intentionally become needs_review even when the score sits mid-range.

A high score is still just a screening result. LeadFilter never deletes or rejects a lead — your workflow decides what happens next.

Error responses

Errors return a non-2xx status and a consistent JSON shape. The request_id is always included so you can trace any failure. A provider_unavailable or service_unavailable response means screening is temporarily down — it never implies the submitted lead is legitimate, so hold and retry rather than letting it through.

error.json
// 400 Bad Request { "error": { "code": "validation_failed", "message": "Lead text is required.", "request_id": "lfreq_..." } }
CodeStatusWhen it happens
validation_failed400The request body was invalid or a required field was missing.
unauthorized401The API key is missing or invalid.
subscription_inactive402No active subscription or trial on the account.
api_key_revoked403This API key has been revoked from the dashboard.
forbidden403The key is valid but not permitted to perform this action.
not_found404The requested resource does not exist.
conflict409The request conflicts with the current state of a resource.
quota_exceeded429The monthly lead-check allowance has been reached.
rate_limited429Too many requests in a short window. Retry with backoff.
provider_unavailable503An upstream classification provider is temporarily unavailable. Retry shortly.
service_unavailable503Screening is temporarily unavailable. Retry shortly.
internal_error500An unexpected error occurred on our side.

This is the stable public error-code vocabulary. Frontend engineering confirms which codes belong in each endpoint's compact reference table during implementation.

Integration guidance

Call LeadFilter wherever a lead enters your world. A common pattern is to screen on form submission or CRM webhook, then branch on the verdict.

Contact formsCRM webhooksAutomationsInternal tools
  • Route likely_legit straight into your pipeline.
  • Send needs_review to a queue for a human to confirm.
  • Hold or tag likely_spam — keep the audit trail either way.

Store the request_id with your lead record so any result can be looked up later in your dashboard logs.

Start screening in minutes.

Create an account, add your business context, generate an API key, and run your first lead check.

Start screening