VICIfast
Guides & tutorials

How to create an agent account with the add_user API

A step-by-step guide to the add_user non-agent API, which creates a new VICIdial agent account from your own application.

VICIfast Support
··3 min read
Call-centre agent wearing a headset — illustration for: How to create an agent account with the add_user API
Photo by Jep Gambardella on Pexels

Your HR system just onboarded ten new hires, and every one of them needs a VICIdial login before their first shift. Creating ten accounts by hand in the admin screen is slow and error-prone. The add_user function lets your own software create each account with a single call.

An Agent in VICIdial is a user account that logs in to take or place calls. This call from the Non-agent API, the back-office set that acts on the database rather than driving a live session, adds one new user to the system.

The five required fields

Five fields are mandatory. Note that these use an agent_ prefix to distinguish the new account from the API user (the user and pass that authorize the call):

  • agent_user - the new login ID, 2 to 20 characters. Send AUTOGENERATED to let VICIdial pick one.
  • agent_pass - the account password, 1 to 20 characters.
  • agent_user_level - a single digit, 1 through 9, controlling what the account can do.
  • agent_full_name - the person's display name, up to 50 characters.
  • agent_user_group - the User group the account belongs to, which must already exist.

A user group is a label that bundles accounts together for permissions and reporting. Here is a minimal call:

curl "http://server/vicidial/non_agent_api.php?source=test&function=add_user&user=6666&pass=1234&agent_user=1000&agent_pass=9999&agent_user_level=1&agent_full_name=Testing+Person&agent_user_group=AGENTS"

Spaces in the full name become a plus sign in the URL, as Testing+Person shows. On success the response begins with SUCCESS and echoes the new login, level, and group.

Optional fields worth setting

Several optional fields save you a second trip to the admin screen. phone_login and phone_pass tie the account to a phone. hotkeys_active turns on Hotkeys, the keyboard shortcuts agents use to disposition calls fast. And in_groups takes a pipe-delimited list such as SALESLINE|SUPPORT to pre-select which inbound groups the agent can take calls from. An Ingroup is one of those inbound queues that routes calls to a group of agents.

There are five custom_one through custom_five fields too, each up to 100 characters, for stashing your own reference data on the account - an HR ID, a team name, a region. They have no effect on dialing; they are storage you can read back later. And wrapup_seconds_override sets a per-agent wrap-up time, the pause after a call ends before the next one starts, if you want this account to differ from the campaign default.

How the call resolves

flowchart TD
  A[add_user request] --> B{API user can add users}
  B -->|No| C[ERROR no permission]
  B -->|Yes| D{All five required fields present}
  D -->|No| E[ERROR must use all required fields]
  D -->|Yes| F{User group exists}
  F -->|No| G[ERROR user group does not exist]
  F -->|Yes| H{Login already taken}
  H -->|Yes| I[ERROR user already exists]
  H -->|No| J[SUCCESS user has been added]
The API user must have user_level 8 or higher with "modify users" enabled, and cannot create accounts at a higher level than its own. This function also does not work with Vtiger integration - if your box uses Vtiger, create users through that path instead.

If you are creating many accounts that share the same settings, building each one from scratch is wasteful. The copy_user call clones an existing account instead - see our guide to copy_user for that shortcut.

For the full set of back-office calls, see the VICIdial API and AGI overview. And if you would rather not stand up and maintain the dialer yourself, VICIfast gives you a managed VICIdial box with the API ready to call - see our plans to get one in under a minute.

About VICIfast

We run VICIdial servers for call centres, so you don’t have to. You get the dialer set up, secured and kept running — we handle the server, the updates and the backups. Bring your own phone carrier at no markup, or use VICIfast Voice, our own US calling and numbers, from $0.0085 a minute. From $49 a month per server.

Questions? Call +1 636 556 0022 and talk to someone who runs dialers.

Citing this article

VICIfast Engineering. “How to create an agent account with the add_user API”. VICIfast LLC, June 28, 2026. Retrieved from https://vicifast.com/blog/how-to-add-a-user-with-add-user-api

Have questions?

You might be interested in

Comments

Comments are reviewed before they appear. We never publish your email.

No comments yet - be the first.