Update Campaign
curl --request PUT \
--url https://api.vaanivoice.ai/api/campaigns/{campaign_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"campaign_name": "<string>",
"concurrency": 123,
"max_retries": 123,
"retry_delay_mins": 123,
"start_time": "<string>",
"end_time": "<string>",
"days_of_week": "<string>",
"from_date": "<string>",
"to_date": "<string>",
"notification_emails": "<string>",
"campaign_webhook_url": "<string>",
"per_call_webhook_url": "<string>"
}
'import requests
url = "https://api.vaanivoice.ai/api/campaigns/{campaign_id}"
payload = {
"campaign_name": "<string>",
"concurrency": 123,
"max_retries": 123,
"retry_delay_mins": 123,
"start_time": "<string>",
"end_time": "<string>",
"days_of_week": "<string>",
"from_date": "<string>",
"to_date": "<string>",
"notification_emails": "<string>",
"campaign_webhook_url": "<string>",
"per_call_webhook_url": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
campaign_name: '<string>',
concurrency: 123,
max_retries: 123,
retry_delay_mins: 123,
start_time: '<string>',
end_time: '<string>',
days_of_week: '<string>',
from_date: '<string>',
to_date: '<string>',
notification_emails: '<string>',
campaign_webhook_url: '<string>',
per_call_webhook_url: '<string>'
})
};
fetch('https://api.vaanivoice.ai/api/campaigns/{campaign_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vaanivoice.ai/api/campaigns/{campaign_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'campaign_name' => '<string>',
'concurrency' => 123,
'max_retries' => 123,
'retry_delay_mins' => 123,
'start_time' => '<string>',
'end_time' => '<string>',
'days_of_week' => '<string>',
'from_date' => '<string>',
'to_date' => '<string>',
'notification_emails' => '<string>',
'campaign_webhook_url' => '<string>',
'per_call_webhook_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vaanivoice.ai/api/campaigns/{campaign_id}"
payload := strings.NewReader("{\n \"campaign_name\": \"<string>\",\n \"concurrency\": 123,\n \"max_retries\": 123,\n \"retry_delay_mins\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"days_of_week\": \"<string>\",\n \"from_date\": \"<string>\",\n \"to_date\": \"<string>\",\n \"notification_emails\": \"<string>\",\n \"campaign_webhook_url\": \"<string>\",\n \"per_call_webhook_url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.vaanivoice.ai/api/campaigns/{campaign_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_name\": \"<string>\",\n \"concurrency\": 123,\n \"max_retries\": 123,\n \"retry_delay_mins\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"days_of_week\": \"<string>\",\n \"from_date\": \"<string>\",\n \"to_date\": \"<string>\",\n \"notification_emails\": \"<string>\",\n \"campaign_webhook_url\": \"<string>\",\n \"per_call_webhook_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vaanivoice.ai/api/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"campaign_name\": \"<string>\",\n \"concurrency\": 123,\n \"max_retries\": 123,\n \"retry_delay_mins\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"days_of_week\": \"<string>\",\n \"from_date\": \"<string>\",\n \"to_date\": \"<string>\",\n \"notification_emails\": \"<string>\",\n \"campaign_webhook_url\": \"<string>\",\n \"per_call_webhook_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyCampaigns
Update Campaign
Update campaign configuration (auto-pauses campaign)
PUT
/
api
/
campaigns
/
{campaign_id}
Update Campaign
curl --request PUT \
--url https://api.vaanivoice.ai/api/campaigns/{campaign_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"campaign_name": "<string>",
"concurrency": 123,
"max_retries": 123,
"retry_delay_mins": 123,
"start_time": "<string>",
"end_time": "<string>",
"days_of_week": "<string>",
"from_date": "<string>",
"to_date": "<string>",
"notification_emails": "<string>",
"campaign_webhook_url": "<string>",
"per_call_webhook_url": "<string>"
}
'import requests
url = "https://api.vaanivoice.ai/api/campaigns/{campaign_id}"
payload = {
"campaign_name": "<string>",
"concurrency": 123,
"max_retries": 123,
"retry_delay_mins": 123,
"start_time": "<string>",
"end_time": "<string>",
"days_of_week": "<string>",
"from_date": "<string>",
"to_date": "<string>",
"notification_emails": "<string>",
"campaign_webhook_url": "<string>",
"per_call_webhook_url": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
campaign_name: '<string>',
concurrency: 123,
max_retries: 123,
retry_delay_mins: 123,
start_time: '<string>',
end_time: '<string>',
days_of_week: '<string>',
from_date: '<string>',
to_date: '<string>',
notification_emails: '<string>',
campaign_webhook_url: '<string>',
per_call_webhook_url: '<string>'
})
};
fetch('https://api.vaanivoice.ai/api/campaigns/{campaign_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vaanivoice.ai/api/campaigns/{campaign_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'campaign_name' => '<string>',
'concurrency' => 123,
'max_retries' => 123,
'retry_delay_mins' => 123,
'start_time' => '<string>',
'end_time' => '<string>',
'days_of_week' => '<string>',
'from_date' => '<string>',
'to_date' => '<string>',
'notification_emails' => '<string>',
'campaign_webhook_url' => '<string>',
'per_call_webhook_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vaanivoice.ai/api/campaigns/{campaign_id}"
payload := strings.NewReader("{\n \"campaign_name\": \"<string>\",\n \"concurrency\": 123,\n \"max_retries\": 123,\n \"retry_delay_mins\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"days_of_week\": \"<string>\",\n \"from_date\": \"<string>\",\n \"to_date\": \"<string>\",\n \"notification_emails\": \"<string>\",\n \"campaign_webhook_url\": \"<string>\",\n \"per_call_webhook_url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.vaanivoice.ai/api/campaigns/{campaign_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_name\": \"<string>\",\n \"concurrency\": 123,\n \"max_retries\": 123,\n \"retry_delay_mins\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"days_of_week\": \"<string>\",\n \"from_date\": \"<string>\",\n \"to_date\": \"<string>\",\n \"notification_emails\": \"<string>\",\n \"campaign_webhook_url\": \"<string>\",\n \"per_call_webhook_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vaanivoice.ai/api/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"campaign_name\": \"<string>\",\n \"concurrency\": 123,\n \"max_retries\": 123,\n \"retry_delay_mins\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"days_of_week\": \"<string>\",\n \"from_date\": \"<string>\",\n \"to_date\": \"<string>\",\n \"notification_emails\": \"<string>\",\n \"campaign_webhook_url\": \"<string>\",\n \"per_call_webhook_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyUpdate Campaign
Update campaign configuration. Important: Campaign is automatically paused before any changes are applied. You must manually resume it after updating viaPOST /campaigns/{id}/resume.
Path Parameters
string
required
UUID of the campaign to update
Request Parameters
All fields are optional. Only provide the fields you want to update.string
Updated campaign name
integer
Updated concurrency (≤ org max)
integer
Updated max retries (1-10)
integer
Updated retry delay (0-1440 minutes)
string
Updated start time — UTC HH:MM (e.g.
05:00)string
Updated end time — UTC HH:MM (e.g.
12:00)string
Comma-separated weekdays
string
Updated from_date YYYY-MM-DD
string
Updated to_date YYYY-MM-DD
string
Comma-separated emails (max 5)
string
Updated campaign webhook URL
string
Updated per-call webhook URL
Example Request
curl -X PUT "https://api.vaani.ai/api/campaigns/abc-123-xyz" \
-H "X-API-Key: vaani_abc123..." \
-F "campaign_name=Updated Campaign" \
-F "concurrency=10" \
-F "start_time=05:00" \
-F "end_time=12:00" \
-F "days_of_week=monday,wednesday,friday"
Response 200 OK
{
"id": "7817f2fd-3380-450e-80ac-8e5249633312",
"client_id": "e3e5b338-937e-4672-a700-1a1f5817a385",
"agent_id": "26356732-d0f3-449a-9fe7-6339ae157687",
"campaign_name": "update name",
"excel_blob_url": "https://vaani-uat-storage.s3.ap-south-1.amazonaws.com/campaigns/e3e5b338-937e-4672-a700-1a1f5817a385/36fb6df6-f08c-4899-9d7a-292334c5e84b_Untitled spreadsheet - Sheet1 (2) (1).csv",
"results_excel_blob_url": null,
"last_result_generated_at": null,
"campaign_status": "paused",
"contact_source_type": "csv",
"gsheet_config": null,
"days_of_week": "tuesday",
"post_processing_status": "pending_excel",
"time_range_from": "04:30:00Z",
"time_range_to": "12:30:00Z",
"max_retries": 3,
"retry_after_mins": 30,
"call_concurrency": 1,
"start_date": "2026-08-25T04:30:00",
"end_date": "2026-08-26T12:30:00",
"created_at": "2026-08-25T10:40:26.128721",
"updated_at": "2026-08-25T10:42:05.109356",
"notification_emails": null,
"webhook_url": "https://polite-dolphin-73.webhook.cool",
"per_call_webhook_url": null,
"webhook_id": null,
"perform_dnd_check": false
}
Important Notes
Campaign is automatically paused when edited. You must call
POST /campaigns/{id}/resume to restart.- Auto-Pause: Campaign is paused before any changes
- Partial Updates: Only provided fields are updated
- Validation: Same constraints as create endpoint apply
- Time Format: UTC 24-hour HH:MM (02:30–14:29)
Error Response
{
"detail": {
"code": "NO_FIELDS_TO_UPDATE",
"message": "No fields provided to update"
}
}

