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
ID of the agent, returned by Create an agent.
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));