List leads
Returns leads visible to the caller. All filters are optional and compose with each other — e.g. ?category=Direct&node=NODE_LEAD_NURTURING returns nurturing Direct leads only.
N+1 note: lead_category, source, and partner are fetched in a single JOIN. The bse filter executes one SQL subquery (WHERE id IN (SELECT lead_id FROM lead_participants WHERE user_id = ?)) — not a per-row lookup.
Authorizations
Enter your JWT token in the format: Bearer
Query Parameters
Filter by assignment state relative to the calling user. pending / ongoing resolve via the assignment-service; completed / rejected resolve locally via LeadParticipant. Users with sales:oversight see all leads by status regardless of assignee. Omit to return all leads visible to the caller.
completed, ongoing, pending, rejected Filter by BSE UUID (LeadParticipant.user_id). Returns leads where this user appears as a participant. Executed as a single SQL subquery — no per-row lookups.
Filter by LeadCategory.name, case-insensitive. e.g. Direct, Agency, Digital, Government.
The pagination cursor value.
Filter by current workflow node code (exact match). e.g. NODE_LEAD_NURTURING, GATE_PROPOSAL_APPROVED.
Number of results to return per page.
Case-insensitive substring search across name, reference, contact_person, contact_phone, and contact_email.
