Skip to content

Leads Service

Leads management is handled inside apps/app — there is no separate leads microservice. Routes live at apps/app/src/v1/leads/ and delegate to @ce-sdr/lib.

Concepts

TermMeaning
Lead Group (Leads model)A named container/list of contacts (e.g., "Q1 Buyers SF")
ContactAn individual prospect record within a lead group
EnrichmentAugmenting contact data with additional info from the enrichment service

Lead Import & Enrichment Flow

See Handshake for full webhook payload specs.

Deduplication

When contacts are imported or campaigns are published, the system deduplicates on:

  • Email (normalized: lowercase + trimmed)
  • Phone (normalized: non-digit characters removed)

Banned leads (global suppression list) are filtered out before any campaign jobs are created.

API Endpoints

MethodPathDescription
POST/v1/leads/Create a lead group
GET/v1/leads/List lead groups for brand
GET/v1/leads/:idGet lead group with contacts
POST/v1/leads/:id/importImport contacts from CSV
POST/v1/leads/:id/contactsAdd individual contact
PATCH/v1/leads/:id/contacts/:contactIdUpdate contact
DELETE/v1/leads/:id/contacts/:contactIdRemove contact

Full interactive reference: API Documentation