Update Campaign
curl --request PUT \
--url https://api.example.com/api/campaigns/{campaign_id} \
--header 'Content-Type: application/json' \
--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.example.com/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 = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'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.example.com/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.example.com/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"
],
]);
$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.example.com/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("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.example.com/api/campaigns/{campaign_id}")
.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.example.com/api/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
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.example.com/api/campaigns/{campaign_id} \
--header 'Content-Type: application/json' \
--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.example.com/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 = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'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.example.com/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.example.com/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"
],
]);
$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.example.com/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("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.example.com/api/campaigns/{campaign_id}")
.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.example.com/api/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
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": "abc-123-xyz",
"campaign_name": "Updated Campaign",
"campaign_status": "paused",
"call_concurrency": 10,
"days_of_week": "monday,wednesday,friday",
"time_range_from": "05:00:00Z",
"time_range_to": "12:00:00Z",
"updated_at": "2026-07-01T14:22:15Z"
}
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"
}
}
⌘I

