Skip to main content

Leads Controller

The Leads Controller provides comprehensive lead management capabilities including lead creation, tracking, pipeline management, conversion tracking, and analytics for the VChata platform.

Base Path

Overview

This controller enables complete lead lifecycle management:
  • 🎯 Lead Creation - Create leads from contacts or social interactions
  • 📊 Pipeline Management - Move leads through customizable stages
  • 🔄 Conversion Tracking - Track conversions and attribution
  • 📈 Analytics - Comprehensive lead analytics and reporting
  • 🎭 Activity Tracking - Log and track lead interactions
  • 🔗 Social Integration - Connect leads to social media interactions

Authentication & Authorization

  • 🔐 All endpoints require valid JWT authentication token
  • 🏢 All operations are scoped to the user’s current organization
  • 👥 Organization membership required for all operations

Lead Management

Create Lead

Description: Creates a new lead for an existing contact in the system.
object

Create Lead with Contact

Description: Creates both a new contact and lead in a single request.
object

Get All Leads

Description: Retrieves all leads for the organization with optional filtering and pagination.
object

Get Lead Details

Description: Retrieves detailed information about a specific lead including activities and related data.

Update Lead

Description: Updates lead information including status, value, assignment, and notes.

Delete Lead

Description: Permanently deletes a lead from the system.

Lead Activities

Add Lead Activity

Description: Adds an activity record to track interactions with the lead.
object

Pipeline Management

Move Lead to Stage

Description: Moves a lead to a different stage in the pipeline.
object

Conversion Management

Convert Conversation to Lead

Description: Converts a conversation (from social media, chat, etc.) into a lead.
object

Analytics

Get Lead Statistics

Description: Retrieves comprehensive lead statistics and metrics.

Get Source Analytics

Description: Retrieves analytics broken down by lead source.

Get Campaign Analytics

Description: Retrieves analytics broken down by campaign.

Get Pipeline Analytics

Description: Retrieves detailed pipeline analytics including stage performance and conversion metrics.

Error Responses

Common Errors

Lead Status Values

  • NEW - Recently created lead
  • QUALIFIED - Lead has been qualified as a potential customer
  • CONTACTED - Initial contact has been made
  • CONVERTED - Lead has been converted to a customer
  • LOST - Lead is no longer viable

Integration Features

  • 🔗 Social Media Integration - Connect leads to social media interactions
  • 📊 UTM Tracking - Track marketing campaign effectiveness
  • 🎯 Attribution - Track lead sources and conversion paths
  • 📈 Real-time Analytics - Live updates on lead performance
  • 🔄 Pipeline Automation - Automatic stage progression rules
  • 📧 Activity Tracking - Complete interaction history
  • 🎭 Custom Fields - Extensible lead data structure