Update Campaign
curl --request PATCH \
--url https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"circuit_breaker": {
"enabled": true,
"failure_threshold": 0.5,
"min_calls_in_window": 5,
"window_seconds": 120
},
"max_concurrency": 50,
"name": "<string>",
"retry_config": {
"enabled": true,
"max_retries": 2,
"retry_delay_seconds": 120,
"retry_on_busy": true,
"retry_on_no_answer": true,
"retry_on_voicemail": true
},
"schedule_config": {
"slots": [
{
"day_of_week": 3,
"end_time": "<string>",
"start_time": "<string>"
}
],
"enabled": true,
"timezone": "UTC"
}
}
'import requests
url = "https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id}"
payload = {
"circuit_breaker": {
"enabled": True,
"failure_threshold": 0.5,
"min_calls_in_window": 5,
"window_seconds": 120
},
"max_concurrency": 50,
"name": "<string>",
"retry_config": {
"enabled": True,
"max_retries": 2,
"retry_delay_seconds": 120,
"retry_on_busy": True,
"retry_on_no_answer": True,
"retry_on_voicemail": True
},
"schedule_config": {
"slots": [
{
"day_of_week": 3,
"end_time": "<string>",
"start_time": "<string>"
}
],
"enabled": True,
"timezone": "UTC"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
circuit_breaker: {
enabled: true,
failure_threshold: 0.5,
min_calls_in_window: 5,
window_seconds: 120
},
max_concurrency: 50,
name: '<string>',
retry_config: {
enabled: true,
max_retries: 2,
retry_delay_seconds: 120,
retry_on_busy: true,
retry_on_no_answer: true,
retry_on_voicemail: true
},
schedule_config: {
slots: [{day_of_week: 3, end_time: '<string>', start_time: '<string>'}],
enabled: true,
timezone: 'UTC'
}
})
};
fetch('https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"failed_rows": 123,
"id": 123,
"name": "<string>",
"processed_rows": 123,
"retry_config": {
"enabled": true,
"max_retries": 123,
"retry_delay_seconds": 123,
"retry_on_busy": true,
"retry_on_no_answer": true,
"retry_on_voicemail": true
},
"source_id": "<string>",
"source_type": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"state": "<string>",
"total_rows": 123,
"workflow_id": 123,
"workflow_name": "<string>",
"circuit_breaker": {
"enabled": false,
"failure_threshold": 0.5,
"min_calls_in_window": 5,
"window_seconds": 120
},
"executed_count": 0,
"logs": [
{
"event": "<string>",
"level": "<string>",
"message": "<string>",
"ts": "<string>",
"details": {}
}
],
"max_concurrency": 123,
"parent_campaign_id": 123,
"redialed_campaign_id": 123,
"schedule_config": {
"enabled": true,
"slots": [
{
"day_of_week": 123,
"end_time": "<string>",
"start_time": "<string>"
}
],
"timezone": "<string>"
},
"telephony_configuration_id": 123,
"telephony_configuration_name": "<string>",
"total_queued_count": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Campaigns
Update Campaign
Update campaign settings
PATCH
/
api
/
v1
/
campaign
/
{campaign_id}
Update Campaign
curl --request PATCH \
--url https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"circuit_breaker": {
"enabled": true,
"failure_threshold": 0.5,
"min_calls_in_window": 5,
"window_seconds": 120
},
"max_concurrency": 50,
"name": "<string>",
"retry_config": {
"enabled": true,
"max_retries": 2,
"retry_delay_seconds": 120,
"retry_on_busy": true,
"retry_on_no_answer": true,
"retry_on_voicemail": true
},
"schedule_config": {
"slots": [
{
"day_of_week": 3,
"end_time": "<string>",
"start_time": "<string>"
}
],
"enabled": true,
"timezone": "UTC"
}
}
'import requests
url = "https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id}"
payload = {
"circuit_breaker": {
"enabled": True,
"failure_threshold": 0.5,
"min_calls_in_window": 5,
"window_seconds": 120
},
"max_concurrency": 50,
"name": "<string>",
"retry_config": {
"enabled": True,
"max_retries": 2,
"retry_delay_seconds": 120,
"retry_on_busy": True,
"retry_on_no_answer": True,
"retry_on_voicemail": True
},
"schedule_config": {
"slots": [
{
"day_of_week": 3,
"end_time": "<string>",
"start_time": "<string>"
}
],
"enabled": True,
"timezone": "UTC"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
circuit_breaker: {
enabled: true,
failure_threshold: 0.5,
min_calls_in_window: 5,
window_seconds: 120
},
max_concurrency: 50,
name: '<string>',
retry_config: {
enabled: true,
max_retries: 2,
retry_delay_seconds: 120,
retry_on_busy: true,
retry_on_no_answer: true,
retry_on_voicemail: true
},
schedule_config: {
slots: [{day_of_week: 3, end_time: '<string>', start_time: '<string>'}],
enabled: true,
timezone: 'UTC'
}
})
};
fetch('https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"failed_rows": 123,
"id": 123,
"name": "<string>",
"processed_rows": 123,
"retry_config": {
"enabled": true,
"max_retries": 123,
"retry_delay_seconds": 123,
"retry_on_busy": true,
"retry_on_no_answer": true,
"retry_on_voicemail": true
},
"source_id": "<string>",
"source_type": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"state": "<string>",
"total_rows": 123,
"workflow_id": 123,
"workflow_name": "<string>",
"circuit_breaker": {
"enabled": false,
"failure_threshold": 0.5,
"min_calls_in_window": 5,
"window_seconds": 120
},
"executed_count": 0,
"logs": [
{
"event": "<string>",
"level": "<string>",
"message": "<string>",
"ts": "<string>",
"details": {}
}
],
"max_concurrency": 123,
"parent_campaign_id": 123,
"redialed_campaign_id": 123,
"schedule_config": {
"enabled": true,
"slots": [
{
"day_of_week": 123,
"end_time": "<string>",
"start_time": "<string>"
}
],
"timezone": "<string>"
},
"telephony_configuration_id": 123,
"telephony_configuration_name": "<string>",
"total_queued_count": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Requires a Labs OAuth user access token with the
super_user role and Editor or higher workspace access. API keys are not accepted for this endpoint. See authentication.
You can update name, concurrency, time slots, and retry config. Updates are only allowed on campaigns in draft or paused status — pause the campaign first if it is currently running.Authorizations
Body
application/json
Response
Successful Response