GET /leads/statistics
Get lead statistics
Retrieve comprehensive lead statistics for the account including conversion rates, volume metrics, and pipeline distribution. Requires readCRM permission.
Try it out
Loading...
Output:
Responses
Description
Statistics retrieved successfully
{ "summaryMetrics": { "totalLeads": 0, "newLeadsThisMonth": 0, "conversionRate": 0, "averageVolume": 0, "changePercentages": { "leads": 0, "conversion": 0, "volume": 0 } }, "leadsByStatus": [ { "status": "string", "count": 0, "percentage": 0 } ], "leadsByStage": [ { "stage": "string", "count": 0 } ], "leadSources": [ { "source": "string", "count": 0, "conversionRate": 0 } ], "topLeadsByVolume": [ { "id": 0, "company": "string", "volume": 0, "status": "string", "assignedTo": "string" } ], "recentActivity": [ { "id": 0, "type": "string", "lead": "string", "description": "string", "timestamp": "string", "user": "string" } ]}Description
Insufficient permissions
References
#/components/schemas/LeadStatistics
type: objectproperties: summaryMetrics: type: object properties: totalLeads: type: integer description: Total number of active leads newLeadsThisMonth: type: integer description: Number of leads created this month conversionRate: type: number description: Overall conversion rate (percentage of leads with applications) averageVolume: type: number description: Average monthly transaction volume across all leads changePercentages: type: object properties: leads: type: number description: Month-over-month percentage change in new leads conversion: type: number description: Month-over-month percentage change in conversion rate volume: type: number description: Month-over-month percentage change in average volume description: High-level summary metrics leadsByStatus: type: array items: type: object properties: status: type: string description: Lead process stage/status count: type: integer description: Number of leads in this status percentage: type: number description: Percentage of total leads in this status description: Lead distribution by process stage leadsByStage: type: array items: type: object properties: stage: type: string description: Lead process stage count: type: integer description: Number of leads in this stage description: Lead distribution by pipeline stage (same as leadsByStatus) leadSources: type: array items: type: object properties: source: type: string description: Lead source name count: type: integer description: Number of leads from this source conversionRate: type: number description: Conversion rate for this source (percentage) description: Top 6 lead sources with performance metrics topLeadsByVolume: type: array items: type: object properties: id: type: integer description: Lead ID company: type: string description: Company name volume: type: integer description: Monthly transaction volume status: type: string description: Current process stage assignedTo: type: string description: User assigned to this lead description: Top 5 leads by monthly transaction volume recentActivity: type: array items: type: object properties: id: type: integer description: Lead ID type: type: string enum: - new_lead - update description: Type of activity lead: type: string description: Lead name or company description: type: string description: Activity description timestamp: type: string description: Human-readable timestamp user: type: string description: User who performed the action description: 4 most recent lead activities|export interface LeadStatistics { /** High-level summary metrics */ summaryMetrics?: { totalLeads?: number; newLeadsThisMonth?: number; conversionRate?: number; averageVolume?: number; changePercentages?: { leads?: number; conversion?: number; volume?: number; }; }; /** Lead distribution by process stage */ leadsByStatus?: { status?: string; count?: number; percentage?: number }[]; /** Lead distribution by pipeline stage (same as leadsByStatus) */ leadsByStage?: { stage?: string; count?: number }[]; /** Top 6 lead sources with performance metrics */ leadSources?: { source?: string; count?: number; conversionRate?: number }[]; /** Top 5 leads by monthly transaction volume */ topLeadsByVolume?: { id?: number; company?: string; volume?: number; status?: string; assignedTo?: string; }[]; /** 4 most recent lead activities */ recentActivity?: { id?: number; type?: "new_lead" | "update"; lead?: string; description?: string; timestamp?: string; user?: string; }[];}Route Source Code
Check out the source code for this route entrypoint here: /leads/statistics/route.ts
Or the swagger.yaml spec this documentation was generated from:
/leads/statistics/swagger.yaml