curl --request GET \
--url https://api.voice.mergenlab.ai/v1/campaign-agents \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.voice.mergenlab.ai/v1/campaign-agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.voice.mergenlab.ai/v1/campaign-agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "agt_credfin_predue_m",
"name": "Credfin pre-due (Hindi, male)",
"language": "hi-IN",
"active": true,
"required_variables": [
"borrower_first_name",
"emi_amount",
"due_date"
],
"optional_variables": [
"lender_name"
],
"default_variables": {
"lender_name": "Credfin"
},
"post_call_variables": [
{
"name": "payment_date",
"type": "date",
"description": "Date the customer said they will pay",
"options": []
},
{
"name": "callback_at",
"type": "datetime",
"description": "When the customer asked to be called back",
"options": []
}
],
"outcomes": [
"confirmed_on_time",
"paid_early",
"callback_scheduled",
"do_not_call",
"wrong_number",
"refused",
"not_reached"
],
"outcome_roles": {
"success": [
"confirmed_on_time",
"paid_early"
],
"do_not_call": [
"do_not_call"
],
"callback": [
"callback_scheduled"
],
"wrong_number": [
"wrong_number"
]
},
"outcome_roles_source": "suggested",
"callback_variable": "callback_at",
"calling_window": {
"start": "09:00",
"end": "19:00"
},
"numbers": [
{
"number": "+9180XXXXXX79",
"is_default": true,
"status": "active",
"pool_paused": false,
"health": "good",
"usable": true
},
{
"number": "+9180XXXXXX80",
"is_default": false,
"status": "active",
"pool_paused": true,
"health": null,
"usable": false
}
],
"has_outbound_number": true,
"contract_source": "live"
}
]
}List the agents a campaign can use
Your active voice agents as a campaign sees them. For each agent you get the variables a record must carry
(required_variables), the ones it may carry (optional_variables) and the values used when a record leaves
them empty (default_variables). You also get what a call with this agent produces: the outcomes it can end
with (outcomes) and the values its analysis fills in after the call (post_call_variables).
outcome_roles says which outcomes count as success, as do not call, as a callback request and as a wrong
number. A new campaign takes these as its defaults. numbers lists the outbound numbers the agent can call
from, and has_outbound_number is true when at least one of them is active and not paused. Not paginated.
curl --request GET \
--url https://api.voice.mergenlab.ai/v1/campaign-agents \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.voice.mergenlab.ai/v1/campaign-agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.voice.mergenlab.ai/v1/campaign-agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "agt_credfin_predue_m",
"name": "Credfin pre-due (Hindi, male)",
"language": "hi-IN",
"active": true,
"required_variables": [
"borrower_first_name",
"emi_amount",
"due_date"
],
"optional_variables": [
"lender_name"
],
"default_variables": {
"lender_name": "Credfin"
},
"post_call_variables": [
{
"name": "payment_date",
"type": "date",
"description": "Date the customer said they will pay",
"options": []
},
{
"name": "callback_at",
"type": "datetime",
"description": "When the customer asked to be called back",
"options": []
}
],
"outcomes": [
"confirmed_on_time",
"paid_early",
"callback_scheduled",
"do_not_call",
"wrong_number",
"refused",
"not_reached"
],
"outcome_roles": {
"success": [
"confirmed_on_time",
"paid_early"
],
"do_not_call": [
"do_not_call"
],
"callback": [
"callback_scheduled"
],
"wrong_number": [
"wrong_number"
]
},
"outcome_roles_source": "suggested",
"callback_variable": "callback_at",
"calling_window": {
"start": "09:00",
"end": "19:00"
},
"numbers": [
{
"number": "+9180XXXXXX79",
"is_default": true,
"status": "active",
"pool_paused": false,
"health": "good",
"usable": true
},
{
"number": "+9180XXXXXX80",
"is_default": false,
"status": "active",
"pool_paused": true,
"health": null,
"usable": false
}
],
"has_outbound_number": true,
"contract_source": "live"
}
]
}Authorizations
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.
Response
The agents, sorted by name.
Show child attributes
Show child attributes