1. Create a New Lead

Creates a new lead in the system with comprehensive contact and interaction details. A lead represents a potential customer or contact who has interacted with your agent. The creation process includes initial contact information, communication preferences, and any existing conversation history.

Endpoint: /lead

Method: POST

Request Body:

{
  "full_name": "string",                          // Required
  "sender_id": "string",                          // Required
  "recipient_id": "string",                       // Required
  "sender_obj": "string",                         // Optional
  "page_id": "string",                            // Optional
  "email_address": "[email protected]",            // Optional
  "phone_number": "+115227400431824",             // Optional
  "other_contact": "string",                      // Optional
  "preferred_way_of_communication": "email",      // Optional
  "requirements": "string",                       // Optional
  "conversation_summary": "string",               // Optional
  "chat_history": "string",                       // Optional
  "quality_score": 100,                           // Optional
  "generation_cost": 0,                           // Optional
  "info": "string",                               // Optional
  "agent_id": "integer",                                  // Required
  "language": "string",                           // Optional
  "status": "active",                             // Optional
  "stage": "string",                              // Optional
  "service_account_id": 0,                        // Optional
  "project_id": "string",                         // Optional
  "template": "string"                            // Optional
}

Response:


2. List All Leads

Retrieves a paginated list of all leads in the system. The response includes comprehensive information about each lead, including their contact details, communication preferences, and interaction history.

The list can be filtered by various parameters such as agent_id, date range, and status.

Endpoint: /lead

Method: GET

Query Parameters: