curl --request PATCH \
--url https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Q4 Outreach v2",
"assistant_id": "asst_xyz456",
"tenant_voice_provider_id": "VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=",
"dialer_type": "POOL",
"phone_number_id": "pn_xyz456",
"phone_number_pool_id": "Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz",
"timezone": "America/Chicago",
"days_of_week": [
"MONDAY",
"WEDNESDAY",
"FRIDAY"
],
"daily_start_time": "08:00",
"daily_end_time": "18:00",
"max_call_attempts": 5,
"max_daily_attempts": 2,
"min_gap_between_attempts": 120,
"consider_voicemail_as_answered": false,
"webhook_url": "https://yourapp.com/webhooks/campaign"
}
'import requests
url = "https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}"
payload = {
"name": "Q4 Outreach v2",
"assistant_id": "asst_xyz456",
"tenant_voice_provider_id": "VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=",
"dialer_type": "POOL",
"phone_number_id": "pn_xyz456",
"phone_number_pool_id": "Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz",
"timezone": "America/Chicago",
"days_of_week": ["MONDAY", "WEDNESDAY", "FRIDAY"],
"daily_start_time": "08:00",
"daily_end_time": "18:00",
"max_call_attempts": 5,
"max_daily_attempts": 2,
"min_gap_between_attempts": 120,
"consider_voicemail_as_answered": False,
"webhook_url": "https://yourapp.com/webhooks/campaign"
}
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({
name: 'Q4 Outreach v2',
assistant_id: 'asst_xyz456',
tenant_voice_provider_id: 'VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=',
dialer_type: 'POOL',
phone_number_id: 'pn_xyz456',
phone_number_pool_id: 'Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz',
timezone: 'America/Chicago',
days_of_week: ['MONDAY', 'WEDNESDAY', 'FRIDAY'],
daily_start_time: '08:00',
daily_end_time: '18:00',
max_call_attempts: 5,
max_daily_attempts: 2,
min_gap_between_attempts: 120,
consider_voicemail_as_answered: false,
webhook_url: 'https://yourapp.com/webhooks/campaign'
})
};
fetch('https://api.voiceaiwrapper.app/api/v2/voice-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.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Q4 Outreach v2',
'assistant_id' => 'asst_xyz456',
'tenant_voice_provider_id' => 'VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=',
'dialer_type' => 'POOL',
'phone_number_id' => 'pn_xyz456',
'phone_number_pool_id' => 'Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz',
'timezone' => 'America/Chicago',
'days_of_week' => [
'MONDAY',
'WEDNESDAY',
'FRIDAY'
],
'daily_start_time' => '08:00',
'daily_end_time' => '18:00',
'max_call_attempts' => 5,
'max_daily_attempts' => 2,
'min_gap_between_attempts' => 120,
'consider_voicemail_as_answered' => false,
'webhook_url' => 'https://yourapp.com/webhooks/campaign'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}"
payload := strings.NewReader("{\n \"name\": \"Q4 Outreach v2\",\n \"assistant_id\": \"asst_xyz456\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"POOL\",\n \"phone_number_id\": \"pn_xyz456\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"timezone\": \"America/Chicago\",\n \"days_of_week\": [\n \"MONDAY\",\n \"WEDNESDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"08:00\",\n \"daily_end_time\": \"18:00\",\n \"max_call_attempts\": 5,\n \"max_daily_attempts\": 2,\n \"min_gap_between_attempts\": 120,\n \"consider_voicemail_as_answered\": false,\n \"webhook_url\": \"https://yourapp.com/webhooks/campaign\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Q4 Outreach v2\",\n \"assistant_id\": \"asst_xyz456\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"POOL\",\n \"phone_number_id\": \"pn_xyz456\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"timezone\": \"America/Chicago\",\n \"days_of_week\": [\n \"MONDAY\",\n \"WEDNESDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"08:00\",\n \"daily_end_time\": \"18:00\",\n \"max_call_attempts\": 5,\n \"max_daily_attempts\": 2,\n \"min_gap_between_attempts\": 120,\n \"consider_voicemail_as_answered\": false,\n \"webhook_url\": \"https://yourapp.com/webhooks/campaign\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Q4 Outreach v2\",\n \"assistant_id\": \"asst_xyz456\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"POOL\",\n \"phone_number_id\": \"pn_xyz456\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"timezone\": \"America/Chicago\",\n \"days_of_week\": [\n \"MONDAY\",\n \"WEDNESDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"08:00\",\n \"daily_end_time\": \"18:00\",\n \"max_call_attempts\": 5,\n \"max_daily_attempts\": 2,\n \"min_gap_between_attempts\": 120,\n \"consider_voicemail_as_answered\": false,\n \"webhook_url\": \"https://yourapp.com/webhooks/campaign\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Campaign updated successfully",
"data": {
"campaign_id": "Vm9pY2VDYW1wYWlnbjoxMjM=",
"campaign_name": "Q4 Outreach Updated",
"campaign_type": "OUTBOUND",
"campaign_status": "DRAFT"
}
}{
"message": "Campaign type cannot be changed after creation",
"errors": [
"Campaign type is immutable"
]
}{
"message": "<string>"
}{
"message": "Campaign not found"
}{
"message": "Internal server error"
}Update Campaign
Partially updates an existing campaign. Only fields provided in the request body are updated.
Authentication
All requests require an Authorization header using Bearer token authentication:
Authorization: Bearer <api_key>
curl --request PATCH \
--url https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Q4 Outreach v2",
"assistant_id": "asst_xyz456",
"tenant_voice_provider_id": "VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=",
"dialer_type": "POOL",
"phone_number_id": "pn_xyz456",
"phone_number_pool_id": "Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz",
"timezone": "America/Chicago",
"days_of_week": [
"MONDAY",
"WEDNESDAY",
"FRIDAY"
],
"daily_start_time": "08:00",
"daily_end_time": "18:00",
"max_call_attempts": 5,
"max_daily_attempts": 2,
"min_gap_between_attempts": 120,
"consider_voicemail_as_answered": false,
"webhook_url": "https://yourapp.com/webhooks/campaign"
}
'import requests
url = "https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}"
payload = {
"name": "Q4 Outreach v2",
"assistant_id": "asst_xyz456",
"tenant_voice_provider_id": "VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=",
"dialer_type": "POOL",
"phone_number_id": "pn_xyz456",
"phone_number_pool_id": "Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz",
"timezone": "America/Chicago",
"days_of_week": ["MONDAY", "WEDNESDAY", "FRIDAY"],
"daily_start_time": "08:00",
"daily_end_time": "18:00",
"max_call_attempts": 5,
"max_daily_attempts": 2,
"min_gap_between_attempts": 120,
"consider_voicemail_as_answered": False,
"webhook_url": "https://yourapp.com/webhooks/campaign"
}
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({
name: 'Q4 Outreach v2',
assistant_id: 'asst_xyz456',
tenant_voice_provider_id: 'VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=',
dialer_type: 'POOL',
phone_number_id: 'pn_xyz456',
phone_number_pool_id: 'Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz',
timezone: 'America/Chicago',
days_of_week: ['MONDAY', 'WEDNESDAY', 'FRIDAY'],
daily_start_time: '08:00',
daily_end_time: '18:00',
max_call_attempts: 5,
max_daily_attempts: 2,
min_gap_between_attempts: 120,
consider_voicemail_as_answered: false,
webhook_url: 'https://yourapp.com/webhooks/campaign'
})
};
fetch('https://api.voiceaiwrapper.app/api/v2/voice-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.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Q4 Outreach v2',
'assistant_id' => 'asst_xyz456',
'tenant_voice_provider_id' => 'VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=',
'dialer_type' => 'POOL',
'phone_number_id' => 'pn_xyz456',
'phone_number_pool_id' => 'Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz',
'timezone' => 'America/Chicago',
'days_of_week' => [
'MONDAY',
'WEDNESDAY',
'FRIDAY'
],
'daily_start_time' => '08:00',
'daily_end_time' => '18:00',
'max_call_attempts' => 5,
'max_daily_attempts' => 2,
'min_gap_between_attempts' => 120,
'consider_voicemail_as_answered' => false,
'webhook_url' => 'https://yourapp.com/webhooks/campaign'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}"
payload := strings.NewReader("{\n \"name\": \"Q4 Outreach v2\",\n \"assistant_id\": \"asst_xyz456\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"POOL\",\n \"phone_number_id\": \"pn_xyz456\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"timezone\": \"America/Chicago\",\n \"days_of_week\": [\n \"MONDAY\",\n \"WEDNESDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"08:00\",\n \"daily_end_time\": \"18:00\",\n \"max_call_attempts\": 5,\n \"max_daily_attempts\": 2,\n \"min_gap_between_attempts\": 120,\n \"consider_voicemail_as_answered\": false,\n \"webhook_url\": \"https://yourapp.com/webhooks/campaign\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Q4 Outreach v2\",\n \"assistant_id\": \"asst_xyz456\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"POOL\",\n \"phone_number_id\": \"pn_xyz456\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"timezone\": \"America/Chicago\",\n \"days_of_week\": [\n \"MONDAY\",\n \"WEDNESDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"08:00\",\n \"daily_end_time\": \"18:00\",\n \"max_call_attempts\": 5,\n \"max_daily_attempts\": 2,\n \"min_gap_between_attempts\": 120,\n \"consider_voicemail_as_answered\": false,\n \"webhook_url\": \"https://yourapp.com/webhooks/campaign\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Q4 Outreach v2\",\n \"assistant_id\": \"asst_xyz456\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"POOL\",\n \"phone_number_id\": \"pn_xyz456\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"timezone\": \"America/Chicago\",\n \"days_of_week\": [\n \"MONDAY\",\n \"WEDNESDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"08:00\",\n \"daily_end_time\": \"18:00\",\n \"max_call_attempts\": 5,\n \"max_daily_attempts\": 2,\n \"min_gap_between_attempts\": 120,\n \"consider_voicemail_as_answered\": false,\n \"webhook_url\": \"https://yourapp.com/webhooks/campaign\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Campaign updated successfully",
"data": {
"campaign_id": "Vm9pY2VDYW1wYWlnbjoxMjM=",
"campaign_name": "Q4 Outreach Updated",
"campaign_type": "OUTBOUND",
"campaign_status": "DRAFT"
}
}{
"message": "Campaign type cannot be changed after creation",
"errors": [
"Campaign type is immutable"
]
}{
"message": "<string>"
}{
"message": "Campaign not found"
}{
"message": "Internal server error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Global ID of the campaign to update. Required.
"Vm9pY2VDYW1wYWlnbjoxMjM="
Body
Fields to update - all are optional; provide only those you want to change
Updated campaign display name. Optional.
"Q4 Outreach v2"
Updated provider-native assistant ID. Optional. Validated against the voice provider.
"asst_xyz456"
Updated global ID of the tenant voice provider. Optional.
Note: tenant_voice_provider_id = voiceai_pod_id
"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM="
Updated dialer type. Optional.
SINGLE, POOL "POOL"
Updated provider-native phone number ID. Optional.
"pn_xyz456"
Updated global ID of the phone number pool (POOL dialer only). Optional.
"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz"
Updated IANA timezone. Optional.
"America/Chicago"
Updated active days of the week. Optional.
["MONDAY", "WEDNESDAY", "FRIDAY"]
Updated daily call start time (HH:MM or HH:MM:SS). Optional.
"08:00"
Updated daily call end time (HH:MM or HH:MM:SS). Optional.
"18:00"
Updated maximum total call attempts per lead. Optional.
x >= 15
Updated maximum call attempts per lead per day. Optional.
x >= 12
Updated minimum minutes between attempts. Optional.
x >= 3120
Updated voicemail-as-answered setting. Optional.
false
Updated webhook URL. Optional.
"https://yourapp.com/webhooks/campaign"
Was this page helpful?

