Agents
Update a campaign agent
Partially update a Campaign Manager agent. Only the fields you send are changed; running campaigns keep the agent snapshot taken at launch.
PUT
/
api
/
v1
/
account
/
{account_id}
/
campaign
/
agents
/
{agent_id}
Update a campaign agent
curl --request PUT \
--url https://api.vobiz.ai/api/v1/account/{account_id}/campaign/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <x-auth-id>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "<string>",
"answer_url": "<string>",
"answer_method": "<string>",
"hangup_url": "<string>",
"hangup_method": "<string>",
"static_headers": [
{}
]
}
'import requests
url = "https://api.vobiz.ai/api/v1/account/{account_id}/campaign/agents/{agent_id}"
payload = {
"name": "<string>",
"answer_url": "<string>",
"answer_method": "<string>",
"hangup_url": "<string>",
"hangup_method": "<string>",
"static_headers": [{}]
}
headers = {
"X-Auth-ID": "<x-auth-id>",
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Auth-ID': '<x-auth-id>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
answer_url: '<string>',
answer_method: '<string>',
hangup_url: '<string>',
hangup_method: '<string>',
static_headers: [{}]
})
};
fetch('https://api.vobiz.ai/api/v1/account/{account_id}/campaign/agents/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));PUT https://api.vobiz.ai/api/v1/account/{account_id}/campaign/agents/{agent_id}
Authentication required
X-Auth-ID— your Vobiz account IDX-Auth-Token— your Vobiz auth token
string
required
Your Vobiz account ID. Use the same value in
X-Auth-ID.string
required
Your Vobiz account ID, for example
MA_XXXXXXXX.string
required
ID of the agent, returned by Create an agent.
string
New agent name. Unique per account, maximum 100 characters.
string
HTTPS URL called when the contact answers.
string
GET or POST.string
URL called when the call ends.
string
GET or POST.array
Replaces the existing array of
{ key, value } SIP headers.Example
cURL
curl -X PUT \
"https://api.vobiz.ai/api/v1/account/{account_id}/campaign/agents/{agent_id}" \
-H "X-Auth-ID: {account_id}" \
-H "X-Auth-Token: {auth_token}" \
-H "Content-Type: application/json" \
-d '{ "answer_url": "https://example.com/answer-v2" }'
Campaigns that are already
running or queued use the agent snapshot frozen at launch. Your edit applies to the next launch, not to work already in flight.Was this page helpful?
⌘I
Update a campaign agent
curl --request PUT \
--url https://api.vobiz.ai/api/v1/account/{account_id}/campaign/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <x-auth-id>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "<string>",
"answer_url": "<string>",
"answer_method": "<string>",
"hangup_url": "<string>",
"hangup_method": "<string>",
"static_headers": [
{}
]
}
'import requests
url = "https://api.vobiz.ai/api/v1/account/{account_id}/campaign/agents/{agent_id}"
payload = {
"name": "<string>",
"answer_url": "<string>",
"answer_method": "<string>",
"hangup_url": "<string>",
"hangup_method": "<string>",
"static_headers": [{}]
}
headers = {
"X-Auth-ID": "<x-auth-id>",
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Auth-ID': '<x-auth-id>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
answer_url: '<string>',
answer_method: '<string>',
hangup_url: '<string>',
hangup_method: '<string>',
static_headers: [{}]
})
};
fetch('https://api.vobiz.ai/api/v1/account/{account_id}/campaign/agents/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));