Skip to content

Agent API catalog

Route: https://{host}/agc/api.php
Common required fields: function, user, pass, agent_user, source
Common output: plain-text SUCCESS: or ERROR: lines; version returns VERSION:.

user/pass identify an API-enabled VICidial account. agent_user identifies the logged-in session to affect. source is an origin label of at most 20 characters. version is the documented exception and can be called without the common fields.

FunctionPurpose
versionShow API version, build, and date/time.
external_hangupHang up the target agent’s current customer call.
external_statusSet disposition and advance the target agent.
external_pausePause/resume now, or pause after the active call.
external_dialPlace a manual dial from the agent screen.
preview_dial_actionApply SKIP, DIALONLY, ALTDIAL, ADR3DIAL, or FINISH during preview/manual alt dial.
external_add_leadAdd a lead to the logged-in agent campaign’s manual-dial list.
change_ingroupsChange selected in-groups for a logged-in agent.
update_fieldsChange selected lead fields shown in the agent interface.
set_timer_actionSet a timer action for the agent’s current call.
st_login_logRead vicidial_users.custom_three and log a CRM event.
st_get_agent_active_leadReturn active lead information for an agent.
ra_call_controlHang up or transfer a call handled by a remote agent.
send_dtmfSend a DTMF string to the agent session.
transfer_conferenceRun transfer/conference frame commands.
park_callPark a customer or retrieve one from park/IVR.
logoutLog the agent out of the agent interface.
recordingStart, stop, or query agent recording.
stereo_recordingStart or stop stereo agent recording.
webserverReturn web-server information for diagnostics/load balancing.
webphone_urlReturn the current agent session’s webphone URL.
call_agentCall an agent to connect them to their session.
pause_codeSet a pause code for a paused agent.
audio_playbackPlay, pause, resume, stop, or restart audio in the agent session.
switch_leadSwitch the active lead ID for a live inbound call.
calls_in_queue_countReturn calls waiting in queues available to the agent.
force_fronter_leave_3wayForce the fronter agent to leave the current three-way call.
force_fronter_audio_stopStop audio playback in the fronter agent session.
send_notificationSend text alerts and/or confetti to the agent interface.
vm_messageSet the voicemail message used by the agent screen VM button.
refresh_panelRefresh script, callbacks, form, or other agent-screen panels.
Terminal window
curl --fail-with-body --get "${VICIDIAL_URL}/agc/api.php" \
--data-urlencode "source=dialdozer-cli" \
--data-urlencode "user=${VICIDIAL_API_USER}" \
--data-urlencode "pass=${VICIDIAL_API_PASS}" \
--data-urlencode "agent_user=1000" \
--data-urlencode "function=external_pause" \
--data-urlencode "value=PAUSE"

Possible bodies include:

SUCCESS: external_pause function set - PAUSE|1232020456|6666
ERROR: agent_user is not logged in - 6666
ERROR: auth USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION - 6666|external_pause|ADMIN

Treat the response as a line protocol. Match the prefix, retain the full unmodified body for diagnostics, and redact credentials from request logs.

Agent operations are order-sensitive. For the source-documented “pause, hang up, disposition” flow, call:

  1. external_pause with value=PAUSE
  2. external_hangup with value=1
  3. external_status with the intended disposition code

Stop if any step returns ERROR:. Retrying the entire sequence blindly can act on a later call. See task recipes.

Function-specific values, required campaign settings, side effects, and exact error variants remain in docs/AGENT_API.txt. Use that file as canonical reference before invoking transfer, recording, remote-agent, timer, or lead-changing commands.