GET
Get one agent as a campaign sees it

Authorizations

Authorization
string
header
required

Authorization: Bearer vg_live_<32 hex characters>. Keys are issued by Mergen admins and shown once. Missing or invalid key: 401 unauthorized. Suspended account: 403 tenant_suspended.

Path Parameters

agentId
string
required

Agent id (see GET /v1/campaign-agents).

Response

The agent.

An agent as a campaign sees it. A record must carry every required_variables entry (a variable with a default is never required). post_call_variables and outcomes say what a call produces. outcome_roles_source is agent when Mergen set the roles for this agent and suggested when they were guessed from the outcome names. contract_source is live when the variables and outcomes were read from the agent's published configuration just now and profile when they come from the agent's stored profile.

id
string
required
name
string
required
language
string | null
required
active
boolean
required
required_variables
string[]
required
optional_variables
string[]
required
default_variables
object
required
post_call_variables
object[]
required
outcomes
string[]
required
outcome_roles
object
required

Which of the agent's outcomes mean success, do not call, a callback request and a wrong number.

outcome_roles_source
enum<string>
required
Available options:
agent,
suggested
callback_variable
string
required

The post-call variable that holds a requested callback time (default callback_at).

calling_window
object
required

The agent's own calling hours in your timezone. A campaign's daily window must overlap them.

numbers
object[]
required
has_outbound_number
boolean
required

At least one number is usable.

contract_source
enum<string>
required
Available options:
live,
profile