VICIdial is a powerful open-source call center solution that provides extensive lead management capabilities. One of the most useful API functions for retrieving lead details is the lead_all_info
API.
This API function allows you to fetch complete lead data from the VICIdial system, including personal details, contact information, call history, custom fields, and status updates.
Why Use the lead_all_info
API?
✅ Retrieve detailed lead information for CRM integration
✅ Access all available lead data in a single API call
✅ Improve agent workflows by displaying complete lead history
✅ Automate lead verification and auditing processes
✅ Extract data for reporting and analytics
In this tutorial, we’ll cover:
- How the
lead_all_info
API works - Prerequisites for using the API
- How to construct and send API requests
- Example API calls using a browser, cURL, and Postman
- Understanding API responses and handling errors
- Best practices for retrieving and using lead data
Let’s get started! 🚀
Understanding the lead_all_info
API Function
The lead_all_info
API retrieves all available data for a given lead, including:
✔ Basic Lead Information (Name, Phone Number, Email, Address)
✔ Call and Campaign History (Status, Last Call Date, Callbacks)
✔ Custom Fields (Any additional fields created in VICIdial)
✔ Lead Assignment Details (Campaign, Agent, List ID)
Common Use Cases for lead_all_info
API
🔹 CRM Integrations – Sync lead data with third-party platforms
🔹 Agent Dashboards – Display lead history before calls
🔹 Lead Verification – Ensure lead details are accurate
🔹 Data Exports – Extract lead data for reporting and analytics
Step 1: Prerequisites for Using the API
Before using the lead_all_info
API, ensure you have:
✅ VICIdial installed and configured
✅ An API-enabled user account with appropriate permissions
✅ A valid lead ID (existing lead in VICIdial)
✅ VICIdial server access credentials
How to Enable API Access in VICIdial
1️⃣ Log in to the VICIdial Admin Panel
2️⃣ Navigate to Admin > Users
3️⃣ Select the user who will access the API
4️⃣ Set API Access to 1
(Enabled)
5️⃣ Set User Level to 7
or higher
6️⃣ Add lead_all_info
to the Allowed API Functions (or set to ALL
)
7️⃣ Click Save Changes
Now, your user is authorized to retrieve lead details using the API.
Step 2: Constructing the API Request
The VICIdial API uses HTTP GET requests, meaning you can access it via a browser, cURL, or API tools like Postman.
Base API URL
🔹 Replace your-vicidial-server
with your actual VICIdial instance.
Required Parameters for lead_all_info
API
Parameter | Description | Example |
---|---|---|
function |
Specifies the API function (lead_all_info ) |
lead_all_info |
user |
VICIdial API username | admin |
pass |
VICIdial API password | 1234 |
source |
Identifier for tracking API calls | CRM_Query |
lead_id |
Unique ID of the lead to retrieve | 1001 |
Step 3: Sending the API Request
Method 1: Retrieving Lead Information via a Web Browser
Simply enter the following URL in your browser (replace credentials accordingly):
🔹 Press Enter, and the lead details should display in your browser.
Method 2: Retrieving Lead Information via cURL (Command Line)
For developers, cURL is a convenient tool for making API requests. Use the following command:
🔹 This will return the lead information directly in the terminal.
Method 3: Retrieving Lead Information via Postman
1️⃣ Open Postman
2️⃣ Set the request type to GET
3️⃣ Enter the API URL
4️⃣ Click Send
5️⃣ View the API response in the output panel
Step 4: Understanding API Responses
If the request is successful, VICIdial returns a response with complete lead details in a pipe-separated format (|
):
Breaking Down the Response
Value | Meaning |
---|---|
1001 |
Lead ID |
John |
First Name |
Doe |
Last Name |
9876543210 |
Phone Number |
johndoe@example.com |
|
123 Main St |
Address |
NY |
State |
USA |
Country |
SALE |
Lead Status |
2024-01-15 |
Last Call Date |
CALLBACK |
Lead Callback Status |
Agent123 |
Assigned Agent |
Campaign1 |
Campaign Name |
CustomField1:Value1 |
Custom field data |
Step 5: Handling Errors & Troubleshooting
If something goes wrong, VICIdial will return an error message instead of lead details.
Common Errors & Fixes
Error Message | Cause | Solution |
---|---|---|
ERROR: USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION |
Insufficient API permissions | Ensure user level is 7+ and API Access is enabled |
ERROR: INVALID USERNAME OR PASSWORD |
Wrong credentials | Verify API username and password |
ERROR: NO FUNCTION SPECIFIED |
Missing function parameter | Ensure function=lead_all_info is included |
ERROR: LEAD NOT FOUND |
Invalid lead ID | Verify that the lead_id exists in VICIdial |
Step 6: Best Practices for Using the lead_all_info
API
✅ Validate lead ID before requesting data to avoid unnecessary queries
✅ Use API responses to populate agent dashboards for better lead handling
✅ Store retrieved data in a structured format (JSON, database, etc.)
✅ Monitor API logs to detect errors and optimize data retrieval processes
✅ Ensure data security by restricting access to sensitive lead information
Conclusion
The lead_all_info
API function is an essential tool for retrieving complete lead details in VICIdial. Whether you’re integrating with a CRM, displaying lead data for agents, or extracting records for analytics, this API provides all the necessary information in a single request.