VICIdial is a powerful open-source call center solution that helps businesses manage inbound, outbound, and blended campaigns. As part of its lead management system, VICIdial provides an option to archive leads to keep the database optimized and improve system performance. However, in certain cases, archived leads may need to be restored for follow-ups, sales conversions, or historical data analysis.
The lead_dearchive
API is a specialized function in VICIdial that allows users to restore previously archived leads, making them active again and available for dialing.
Why Use the lead_dearchive
API?
✅ Retrieve leads that were mistakenly archived
✅ Reactivate old leads for new campaigns
✅ Restore historical lead data for reporting
✅ Reduce manual work by automating lead restoration
In this tutorial, we will cover:
🔹 What the lead_dearchive
API does
🔹 How to configure and authenticate API access
🔹 How to construct and send API requests
🔹 Examples of API calls using a browser, cURL, and Postman
🔹 How to interpret API responses and troubleshoot errors
🔹 Best practices for using the lead_dearchive
API efficiently
Let’s get started! 🚀
Understanding the lead_dearchive
API Function
The lead_dearchive
API is designed to restore leads that were previously archived, making them active again in VICIdial. This function is essential for businesses that:
✔ Accidentally archived leads and need to retrieve them
✔ Want to bring back old leads for retargeting
✔ Need to access archived lead information for reporting
Common Use Cases for lead_dearchive
API
🔹 Reactivating leads for new marketing campaigns
🔹 Restoring old customer records for follow-ups
🔹 Undoing accidental lead archiving
🔹 Automating lead recovery processes
Step 1: Prerequisites for Using the API
Before using the lead_dearchive
API, ensure you have the following:
✅ VICIdial installed and configured
✅ An API-enabled user account with the correct permissions
✅ A valid lead ID that was archived
✅ 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_dearchive
to the Allowed API Functions (or set to ALL
)
7️⃣ Click Save Changes
Now, your user is authorized to restore archived leads 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_dearchive
API
Parameter | Description | Example |
---|---|---|
function |
Specifies the API function (lead_dearchive ) |
lead_dearchive |
user |
VICIdial API username | admin |
pass |
VICIdial API password | 1234 |
source |
Identifier for tracking API calls | CRM_Reactivation |
lead_id |
The ID of the lead to restore | 1001 |
Step 3: Sending the API Request
Method 1: Restoring a Lead via a Web Browser
Simply enter the following URL in your browser (replace credentials accordingly):
🔹 Press Enter, and the API response should confirm the restoration of the lead.
Method 2: Restoring a Lead via cURL (Command Line)
For developers, cURL is a convenient tool for making API requests. Use the following command:
🔹 This will restore the archived lead and return the API response in the terminal.
Method 3: Restoring a Lead 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 confirming the restoration:
Breaking Down the Response
Value | Meaning |
---|---|
1001 |
Lead ID |
Restored |
The lead has been successfully de-archived |
Step 5: Handling Errors & Troubleshooting
If something goes wrong, VICIdial will return an error message instead of the success confirmation.
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_dearchive is included |
ERROR: LEAD NOT FOUND OR NOT ARCHIVED |
Lead is either missing or not archived | Check if the lead exists and is archived |
Step 6: Best Practices for Using the lead_dearchive
API
✅ Ensure that the lead exists and is archived before sending a request
✅ Limit API access to authorized users only to prevent unauthorized restoration
✅ Use API logs to track de-archived leads for accountability and reporting
✅ Schedule automated checks to ensure old leads are restored properly
✅ Integrate this API with CRM systems to sync lead status changes
Conclusion
The lead_dearchive
API function is an essential tool for businesses that need to restore archived leads in VICIdial. Whether you need to reactivate old leads, recover lost data, or undo accidental lead archiving, this API provides a quick and efficient solution.
📌 Key Takeaways
✅ The lead_dearchive
API restores archived leads in VICIdial
✅ Requires an API-enabled user with appropriate permissions
✅ API requests can be made via browser, cURL, or Postman
✅ Common errors are permission and input-related and can be fixed in Admin settings
Feel free to contact us or simply start a live chat to get connected to one of our team members. Here is our contact information.
Calling from US: +1 954-990-0053
Email: office@callix.ai