1. Process Lead(s) for Task Assignment

Process one or more leads through the complete AI-powered task assignment workflow. This endpoint validates the request and starts background processing that analyzes conversations, determines appropriate actions, and generates personalized responses. Processing typically takes 30 seconds per lead.

Endpoint: /lead/process

Method: POST

Operation Modes:

  1. Single Lead Mode - When a single lead_id is provided
  2. Batch Mode - When a list of lead_ids is provided (processed in batches of 5)

Request Body:

{
    "lead_ids": [277, 278, 279],                       // Required: Lead ID(s) to process (can be single integer or list)
    "superagent_service_token": "sa_token_abc123",    // Required: Service token for Superagent API authentication
    "superagent_environment": "staging"                // Optional: Superagent environment (default: based on app environment)
}

Response:

2. Get Lead Processing Service Status

Checks if the lead processing service is healthy and ready to process requests. This endpoint provides a health check for the lead processing service infrastructure.

Endpoint: /lead/status

Method: GET

Response: