← All projects

API Platform / Lead Infrastructure

LeadSwitchly

Solo architect & engineer

An API-first lead routing & delivery network I designed and built end to end — it validates, scores, routes, and delivers insurance leads between platforms through one universal API, with a deterministic scoring engine, signed webhooks, and a credit wallet.

LaravelPHP 8.5REST API / OpenAPISanctumStripe / CashierHorizon + RedisSigned WebhooksMySQLFilament

Visit leadswitchly.com →

I designed and built LeadSwitchly end to end — an API-first lead routing and delivery network that acts as a protocol-layer router, not another lead vendor. Insurance directory platforms send raw leads through one universal API, and LeadSwitchly validates, scores, and routes each lead to the best-matching licensed agent across the whole network — charging wallets and notifying subscribers via signed webhooks, with the same rigor you'd expect from a payments stack.

Highlights

  • A versioned REST API (v1) with endpoints for lead ingest, validation, bulk ingest, routing, delivery, scoring, and status, plus agent sync and self-serve webhook subscription CRUD — secured by per-platform API keys with plan-aware rate limits and daily caps.
  • A deterministic RoutingScore v1.0 engine that combines lead quality, intent, contactability, fraud signals, and platform & agent performance. Every routing decision writes a full score breakdown to an immutable audit log — the audit log is the score.
  • A Universal Lead Schema spanning nine insurance product lines (Medicare, Health, Life, Auto, Home, Commercial, Final Expense, Annuities, and more) in consistent blocks — a new product line can be added with no migration.
  • A signed webhook system mirroring Stripe's HMAC approach (X-Switchly-Signature), with replay tolerance, fan-out delivery, six lifecycle events, and per-subscriber signing secrets they rotate independently.
  • A credit economy and wallet: a credit pricing engine, a transaction ledger, plan-aware billing through Laravel Cashier and Stripe, monthly included credits, and rollover within the billing period.
  • A fully asynchronous pipeline — routing, delivery, and webhook fan-out run as queued jobs processed by Laravel Horizon on Redis for throughput and resilience.

Beyond the engine, I built the developer experience that makes a platform like this usable: a hosted OpenAPI 3.1 reference, written integration / schema / webhook guides, and an admin sandbox with endpoint templates — alongside an agent-facing portal (inbox, outbox, wallet, preferences) on Livewire and a Filament operations admin. The result moves leads between systems with the integrity, observability, and rigor of a payments network.