PUT
/v1/admin/campaigns/{id}
Update Campaign
curl -X PUT https://api.{cluster}.{platform}.voiger.io/v1/admin/campaigns/{id} \
-H "Cookie: sid=$VOIGER_SESSION" \
-H "x-workspace-code: your-workspace-code" \
-H "x-csrf-token: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"campaign": {
"name": "summer-offer",
"strategy": "voice_broadcast",
"type": "tts",
"tts": {
"language": "en",
"text": "Hello, I am calling regarding your interest in our summer offer. Do you have a few minutes to talk?"
},
"status": "paused",
"connector_id": "23967773-1d16-4f81-8582-5b9193601d26",
"country": "US",
"restrict_tag_ids": [],
"recall_waiting_time": 30,
"retries": 3,
"retry_delay": 60,
"ring_timeout": 30,
"concurrency": 10,
"timeslots": {
"1": [
"09:00-12:00",
"13:00-18:00"
]
}
}
}'
const res = await fetch("https://api.{cluster}.{platform}.voiger.io/v1/admin/campaigns/{id}", {
method: "PUT",
credentials: "include",
headers: { "x-workspace-code": "your-workspace-code" },
headers: { "Content-Type": "application/json", "x-csrf-token": csrf },
body: JSON.stringify({
"campaign": {
"name": "summer-offer",
"strategy": "voice_broadcast",
"type": "tts",
"tts": {
"language": "en",
"text": "Hello, I am calling regarding your interest in our summer offer. Do you have a few minutes to talk?"
},
"status": "paused",
"connector_id": "23967773-1d16-4f81-8582-5b9193601d26",
"country": "US",
"restrict_tag_ids": [],
"recall_waiting_time": 30,
"retries": 3,
"retry_delay": 60,
"ring_timeout": 30,
"concurrency": 10,
"timeslots": {
"1": [
"09:00-12:00",
"13:00-18:00"
]
}
}
}),
})
const data = await res.json()
Parameters
x-workspace-code
string
required
in header
x-csrf-token
string
required
in header
id
string
required
in path
strategy
string
The strategy/type combination for the campaign.
- progressive_dialer: Type will be pre_connect or post_connect.
- voice_broadcast: Type will be audio, tts or ivr.
audio_id
null | string
Present when type is audio.
tts▾
null | object
Present when type is tts.
ivr_id
null | string
Present when type is ivr.
queue_id
null | string
Present when type is pre_connect or post_connect. Omitted for voice_broadcast.
calls_per_agent
integer
Predictive dialer only. Number of calls to place per available agent.
restrict_tag_ids
null | array
If null, any tag is allowed.
If empty array, no tags are allowed.
If filled, only those tag ids are allowed.
recall_waiting_time
integer
total
integer
Total customers in the campaign.
processed
integer
Number of customers processed (terminal disposition). Use with total for progress
(processed / total) and with answered for answer rate (answered / processed).
answered
integer
Number of customers who answered. Answer rate = answered / processed (when processed > 0).
weight
number
Campaign weight for proportional slot distribution when agents are shared across campaigns.
Updated via PUT /campaigns/weights.
json · 200
{
"campaign": {
"id": "23967773-1d16-4f81-8582-5b9193601d26",
"name": "summer-offer",
"strategy": "progressive_dialer",
"type": "pre_connect",
"queue_id": "23967773-1d16-4f81-8582-5b9193601d26",
"connector_id": "91936773-1d16-4f81-8582-5b9193601d26",
"country": "US",
"reason": "Follow up on recent inquiry about summer offer.",
"agent_script": "Hello, I am calling regarding your interest in our summer offer. Do you have a few minutes to talk?",
"restrict_tag_ids": null,
"retries": 3,
"recall_waiting_time": 30,
"retry_delay": 60,
"ring_timeout": 30,
"concurrency": 10,
"calls_per_agent": 1,
"total": 100,
"processed": 50,
"answered": 31,
"weight": 100,
"status": "in_progress",
"start_date": "2024-06-01",
"end_date": "2024-06-01",
"created_at": "2024-06-01T12:00:00Z",
"updated_at": "2024-06-01T12:30:00Z",
"timeslots": {
"1": [
"09:00-12:00",
"13:00-18:00"
]
}
}
}