VICIdial is a widely used open-source call center solution that provides powerful tools for managing agents, supervisors, and administrators. One common administrative task is creating multiple users with similar roles and permissions. Instead of manually setting up each user from scratch, VICIdial offers the copy_user API, which allows administrators to quickly duplicate an existing user account with the same settings.
Why Use the copy_user API?
✅ Save time by quickly creating multiple users with similar settings
✅ Ensure consistency in user permissions and configurations
✅ Automate user creation for new agents or team members
✅ Reduce human errors when setting up new accounts
In this guide, you’ll learn:
🔹 How the copy_user API works
🔹 How to configure and authenticate API access
🔹 How to construct and send API requests
🔹 Examples using a browser, cURL, and Postman
🔹 How to interpret API responses and troubleshoot errors
🔹 Best practices for using the copy_user API efficiently
Let’s get started! 🚀
Understanding the copy_user API Function
The copy_user API allows administrators to duplicate an existing user, creating a new user with the same settings. This function is especially useful when:
✔ Onboarding new agents who need the same permissions and access
✔ Duplicating supervisors or administrators for new teams
✔ Standardizing user settings across multiple accounts
Common Use Cases for copy_user API
🔹 Creating multiple agent accounts with the same settings
🔹 Duplicating admin or manager roles for new team leaders
🔹 Automating onboarding processes for call centers
🔹 Reducing manual effort in setting up new users
Step 1: Prerequisites for Using the API
Before using the copy_user API, ensure you have:
✅ VICIdial installed and configured
✅ An API-enabled user account with administrative permissions**
✅ A valid existing user ID to copy
✅ A new unique user ID for the duplicate user
✅ 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 8 or higher** (Admin-level access) 6️⃣ Add copy_userto the **Allowed API Functions** (or set toALL`)
7️⃣ Click Save Changes
Now, your user is authorized to duplicate accounts 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 copy_user API
| Parameter | Description | Example |
|---|---|---|
function |
Specifies the API function (copy_user) |
copy_user |
user |
VICIdial API username | admin |
pass |
VICIdial API password | 1234 |
source |
Identifier for tracking API calls | UserDuplication |
user_id |
The existing user ID to copy | agent001 |
new_user_id |
The new unique user ID to create | agent002 |
Step 3: Sending the API Request
Method 1: Duplicating a User via a Web Browser
Simply enter the following URL in your browser (replace credentials accordingly):
🔹 Press Enter, and the API response should confirm the user duplication.
Method 2: Duplicating a User via cURL (Command Line)
For developers, cURL is a convenient tool for making API requests. Use the following command:
🔹 This will create a duplicate user and return the API response in the terminal.
Method 3: Duplicating a User 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 user duplication:
Breaking Down the Response
| Value | Meaning |
|---|---|
agent002 |
The newly created user’s ID |
Duplicated from agent001 |
Confirmation that the user was copied successfully |
Step 5: Handling Errors & Troubleshooting
If something goes wrong, VICIdial will return an error message instead of a 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 8+ 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=copy_user is included |
ERROR: USER ID ALREADY EXISTS |
The new user ID is taken | Choose a unique new_user_id |
Step 6: Best Practices for Using the copy_user API
✅ Use unique user IDs when creating duplicates
✅ Verify that the copied user has the correct permissions before duplication
✅ Automate bulk user creation using API scripts
✅ Log API actions to track user duplications for auditing
✅ Ensure sensitive data like passwords are updated after duplication
Conclusion
The copy_user API function is an essential tool for quickly duplicating agent, supervisor, and administrator accounts in VICIdial. Whether you’re scaling your call center, onboarding new team members, or ensuring consistency across users, this API provides a fast and automated solution.
📌 Key Takeaways
✅ The copy_user API duplicates existing users in VICIdial
✅ Requires an API-enabled user with administrative 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






