curl --request POST \
--url https://api.voiceaiwrapper.app/api/v2/voice-campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Q4 Outreach",
"type": "OUTBOUND",
"assistant_id": "asst_abc123",
"tenant_voice_provider_id": "VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=",
"dialer_type": "SINGLE",
"vapi_calling_entity": "ASSISTANT",
"phone_number_id": "pn_abc123",
"phone_number_pool_id": "Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz",
"start_date": "2025-01-01",
"end_date": "2025-03-31",
"timezone": "America/New_York",
"days_of_week": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY"
],
"daily_start_time": "09:00",
"daily_end_time": "17:00",
"max_call_attempts": 3,
"max_daily_attempts": 1,
"min_gap_between_attempts": 60,
"consider_voicemail_as_answered": true,
"webhook_url": "https://yourapp.com/webhooks/campaign"
}
'import requests
url = "https://api.voiceaiwrapper.app/api/v2/voice-campaigns"
payload = {
"name": "Q4 Outreach",
"type": "OUTBOUND",
"assistant_id": "asst_abc123",
"tenant_voice_provider_id": "VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=",
"dialer_type": "SINGLE",
"vapi_calling_entity": "ASSISTANT",
"phone_number_id": "pn_abc123",
"phone_number_pool_id": "Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz",
"start_date": "2025-01-01",
"end_date": "2025-03-31",
"timezone": "America/New_York",
"days_of_week": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"],
"daily_start_time": "09:00",
"daily_end_time": "17:00",
"max_call_attempts": 3,
"max_daily_attempts": 1,
"min_gap_between_attempts": 60,
"consider_voicemail_as_answered": True,
"webhook_url": "https://yourapp.com/webhooks/campaign"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Q4 Outreach',
type: 'OUTBOUND',
assistant_id: 'asst_abc123',
tenant_voice_provider_id: 'VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=',
dialer_type: 'SINGLE',
vapi_calling_entity: 'ASSISTANT',
phone_number_id: 'pn_abc123',
phone_number_pool_id: 'Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz',
start_date: '2025-01-01',
end_date: '2025-03-31',
timezone: 'America/New_York',
days_of_week: ['MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY'],
daily_start_time: '09:00',
daily_end_time: '17:00',
max_call_attempts: 3,
max_daily_attempts: 1,
min_gap_between_attempts: 60,
consider_voicemail_as_answered: true,
webhook_url: 'https://yourapp.com/webhooks/campaign'
})
};
fetch('https://api.voiceaiwrapper.app/api/v2/voice-campaigns', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Q4 Outreach',
'type' => 'OUTBOUND',
'assistant_id' => 'asst_abc123',
'tenant_voice_provider_id' => 'VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=',
'dialer_type' => 'SINGLE',
'vapi_calling_entity' => 'ASSISTANT',
'phone_number_id' => 'pn_abc123',
'phone_number_pool_id' => 'Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz',
'start_date' => '2025-01-01',
'end_date' => '2025-03-31',
'timezone' => 'America/New_York',
'days_of_week' => [
'MONDAY',
'TUESDAY',
'WEDNESDAY',
'THURSDAY',
'FRIDAY'
],
'daily_start_time' => '09:00',
'daily_end_time' => '17:00',
'max_call_attempts' => 3,
'max_daily_attempts' => 1,
'min_gap_between_attempts' => 60,
'consider_voicemail_as_answered' => true,
'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"
payload := strings.NewReader("{\n \"name\": \"Q4 Outreach\",\n \"type\": \"OUTBOUND\",\n \"assistant_id\": \"asst_abc123\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"SINGLE\",\n \"vapi_calling_entity\": \"ASSISTANT\",\n \"phone_number_id\": \"pn_abc123\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"start_date\": \"2025-01-01\",\n \"end_date\": \"2025-03-31\",\n \"timezone\": \"America/New_York\",\n \"days_of_week\": [\n \"MONDAY\",\n \"TUESDAY\",\n \"WEDNESDAY\",\n \"THURSDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"09:00\",\n \"daily_end_time\": \"17:00\",\n \"max_call_attempts\": 3,\n \"max_daily_attempts\": 1,\n \"min_gap_between_attempts\": 60,\n \"consider_voicemail_as_answered\": true,\n \"webhook_url\": \"https://yourapp.com/webhooks/campaign\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.voiceaiwrapper.app/api/v2/voice-campaigns")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Q4 Outreach\",\n \"type\": \"OUTBOUND\",\n \"assistant_id\": \"asst_abc123\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"SINGLE\",\n \"vapi_calling_entity\": \"ASSISTANT\",\n \"phone_number_id\": \"pn_abc123\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"start_date\": \"2025-01-01\",\n \"end_date\": \"2025-03-31\",\n \"timezone\": \"America/New_York\",\n \"days_of_week\": [\n \"MONDAY\",\n \"TUESDAY\",\n \"WEDNESDAY\",\n \"THURSDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"09:00\",\n \"daily_end_time\": \"17:00\",\n \"max_call_attempts\": 3,\n \"max_daily_attempts\": 1,\n \"min_gap_between_attempts\": 60,\n \"consider_voicemail_as_answered\": true,\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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Q4 Outreach\",\n \"type\": \"OUTBOUND\",\n \"assistant_id\": \"asst_abc123\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"SINGLE\",\n \"vapi_calling_entity\": \"ASSISTANT\",\n \"phone_number_id\": \"pn_abc123\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"start_date\": \"2025-01-01\",\n \"end_date\": \"2025-03-31\",\n \"timezone\": \"America/New_York\",\n \"days_of_week\": [\n \"MONDAY\",\n \"TUESDAY\",\n \"WEDNESDAY\",\n \"THURSDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"09:00\",\n \"daily_end_time\": \"17:00\",\n \"max_call_attempts\": 3,\n \"max_daily_attempts\": 1,\n \"min_gap_between_attempts\": 60,\n \"consider_voicemail_as_answered\": true,\n \"webhook_url\": \"https://yourapp.com/webhooks/campaign\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Campaign created successfully",
"data": {
"campaign_id": "Vm9pY2VDYW1wYWlnbjoxMjM=",
"campaign_name": "Q4 Outreach",
"campaign_type": "OUTBOUND",
"campaign_status": "DRAFT"
}
}{
"message": "Invalid data",
"errors": [
"Campaign name is missing: name"
]
}{
"message": "<string>"
}{
"message": "You've discovered a premium feature! Upgrade your plan to access this and other advanced features.",
"errors": [
"Campaign limit reached"
]
}{
"message": "Tenant voice provider not found",
"errors": [
"Invalid voiceai_pod_id"
]
}{
"message": "Internal server error"
}Create Campaign
Creates a new campaign for the authenticated tenant.
Authentication
All requests require an Authorization header using Bearer token authentication:
Authorization: Bearer <api_key>
curl --request POST \
--url https://api.voiceaiwrapper.app/api/v2/voice-campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Q4 Outreach",
"type": "OUTBOUND",
"assistant_id": "asst_abc123",
"tenant_voice_provider_id": "VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=",
"dialer_type": "SINGLE",
"vapi_calling_entity": "ASSISTANT",
"phone_number_id": "pn_abc123",
"phone_number_pool_id": "Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz",
"start_date": "2025-01-01",
"end_date": "2025-03-31",
"timezone": "America/New_York",
"days_of_week": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY"
],
"daily_start_time": "09:00",
"daily_end_time": "17:00",
"max_call_attempts": 3,
"max_daily_attempts": 1,
"min_gap_between_attempts": 60,
"consider_voicemail_as_answered": true,
"webhook_url": "https://yourapp.com/webhooks/campaign"
}
'import requests
url = "https://api.voiceaiwrapper.app/api/v2/voice-campaigns"
payload = {
"name": "Q4 Outreach",
"type": "OUTBOUND",
"assistant_id": "asst_abc123",
"tenant_voice_provider_id": "VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=",
"dialer_type": "SINGLE",
"vapi_calling_entity": "ASSISTANT",
"phone_number_id": "pn_abc123",
"phone_number_pool_id": "Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz",
"start_date": "2025-01-01",
"end_date": "2025-03-31",
"timezone": "America/New_York",
"days_of_week": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"],
"daily_start_time": "09:00",
"daily_end_time": "17:00",
"max_call_attempts": 3,
"max_daily_attempts": 1,
"min_gap_between_attempts": 60,
"consider_voicemail_as_answered": True,
"webhook_url": "https://yourapp.com/webhooks/campaign"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Q4 Outreach',
type: 'OUTBOUND',
assistant_id: 'asst_abc123',
tenant_voice_provider_id: 'VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=',
dialer_type: 'SINGLE',
vapi_calling_entity: 'ASSISTANT',
phone_number_id: 'pn_abc123',
phone_number_pool_id: 'Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz',
start_date: '2025-01-01',
end_date: '2025-03-31',
timezone: 'America/New_York',
days_of_week: ['MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY'],
daily_start_time: '09:00',
daily_end_time: '17:00',
max_call_attempts: 3,
max_daily_attempts: 1,
min_gap_between_attempts: 60,
consider_voicemail_as_answered: true,
webhook_url: 'https://yourapp.com/webhooks/campaign'
})
};
fetch('https://api.voiceaiwrapper.app/api/v2/voice-campaigns', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Q4 Outreach',
'type' => 'OUTBOUND',
'assistant_id' => 'asst_abc123',
'tenant_voice_provider_id' => 'VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=',
'dialer_type' => 'SINGLE',
'vapi_calling_entity' => 'ASSISTANT',
'phone_number_id' => 'pn_abc123',
'phone_number_pool_id' => 'Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz',
'start_date' => '2025-01-01',
'end_date' => '2025-03-31',
'timezone' => 'America/New_York',
'days_of_week' => [
'MONDAY',
'TUESDAY',
'WEDNESDAY',
'THURSDAY',
'FRIDAY'
],
'daily_start_time' => '09:00',
'daily_end_time' => '17:00',
'max_call_attempts' => 3,
'max_daily_attempts' => 1,
'min_gap_between_attempts' => 60,
'consider_voicemail_as_answered' => true,
'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"
payload := strings.NewReader("{\n \"name\": \"Q4 Outreach\",\n \"type\": \"OUTBOUND\",\n \"assistant_id\": \"asst_abc123\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"SINGLE\",\n \"vapi_calling_entity\": \"ASSISTANT\",\n \"phone_number_id\": \"pn_abc123\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"start_date\": \"2025-01-01\",\n \"end_date\": \"2025-03-31\",\n \"timezone\": \"America/New_York\",\n \"days_of_week\": [\n \"MONDAY\",\n \"TUESDAY\",\n \"WEDNESDAY\",\n \"THURSDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"09:00\",\n \"daily_end_time\": \"17:00\",\n \"max_call_attempts\": 3,\n \"max_daily_attempts\": 1,\n \"min_gap_between_attempts\": 60,\n \"consider_voicemail_as_answered\": true,\n \"webhook_url\": \"https://yourapp.com/webhooks/campaign\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.voiceaiwrapper.app/api/v2/voice-campaigns")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Q4 Outreach\",\n \"type\": \"OUTBOUND\",\n \"assistant_id\": \"asst_abc123\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"SINGLE\",\n \"vapi_calling_entity\": \"ASSISTANT\",\n \"phone_number_id\": \"pn_abc123\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"start_date\": \"2025-01-01\",\n \"end_date\": \"2025-03-31\",\n \"timezone\": \"America/New_York\",\n \"days_of_week\": [\n \"MONDAY\",\n \"TUESDAY\",\n \"WEDNESDAY\",\n \"THURSDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"09:00\",\n \"daily_end_time\": \"17:00\",\n \"max_call_attempts\": 3,\n \"max_daily_attempts\": 1,\n \"min_gap_between_attempts\": 60,\n \"consider_voicemail_as_answered\": true,\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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Q4 Outreach\",\n \"type\": \"OUTBOUND\",\n \"assistant_id\": \"asst_abc123\",\n \"tenant_voice_provider_id\": \"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=\",\n \"dialer_type\": \"SINGLE\",\n \"vapi_calling_entity\": \"ASSISTANT\",\n \"phone_number_id\": \"pn_abc123\",\n \"phone_number_pool_id\": \"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz\",\n \"start_date\": \"2025-01-01\",\n \"end_date\": \"2025-03-31\",\n \"timezone\": \"America/New_York\",\n \"days_of_week\": [\n \"MONDAY\",\n \"TUESDAY\",\n \"WEDNESDAY\",\n \"THURSDAY\",\n \"FRIDAY\"\n ],\n \"daily_start_time\": \"09:00\",\n \"daily_end_time\": \"17:00\",\n \"max_call_attempts\": 3,\n \"max_daily_attempts\": 1,\n \"min_gap_between_attempts\": 60,\n \"consider_voicemail_as_answered\": true,\n \"webhook_url\": \"https://yourapp.com/webhooks/campaign\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Campaign created successfully",
"data": {
"campaign_id": "Vm9pY2VDYW1wYWlnbjoxMjM=",
"campaign_name": "Q4 Outreach",
"campaign_type": "OUTBOUND",
"campaign_status": "DRAFT"
}
}{
"message": "Invalid data",
"errors": [
"Campaign name is missing: name"
]
}{
"message": "<string>"
}{
"message": "You've discovered a premium feature! Upgrade your plan to access this and other advanced features.",
"errors": [
"Campaign limit reached"
]
}{
"message": "Tenant voice provider not found",
"errors": [
"Invalid voiceai_pod_id"
]
}{
"message": "Internal server error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Campaign configuration
Campaign display name. Required.
"Q4 Outreach"
Campaign type. Required. Immutable after creation.
INBOUND, OUTBOUND "OUTBOUND"
Provider-native assistant/agent ID to use for calls. Required.
"asst_abc123"
Global ID of the tenant voice provider to use. Required.
Note: tenant_voice_provider_id = voiceai_pod_id
"VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM="
Dialer type. Required.
SINGLE, POOL "SINGLE"
VAPI calling entity type (VAPI provider only). Optional.
ASSISTANT, WORKFLOW, SQUAD "ASSISTANT"
Provider-native phone number ID. Optional. Can be configured after creation.
"pn_abc123"
Global ID of the phone number pool (POOL dialer only). Optional.
"Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz"
Campaign start date (YYYY-MM-DD). Required for OUTBOUND campaigns.
"2025-01-01"
Campaign end date (YYYY-MM-DD). Optional. Must be after start_date if provided.
"2025-03-31"
IANA timezone string. Required for OUTBOUND campaigns.
"America/New_York"
Days of the week when the campaign is active. Required for OUTBOUND campaigns.
[
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY"
]
Daily call start time (HH:MM or HH:MM:SS). Required for OUTBOUND campaigns.
"09:00"
Daily call end time (HH:MM or HH:MM:SS). Required for OUTBOUND campaigns. Must be after daily_start_time.
"17:00"
Maximum total call attempts per lead. Required for OUTBOUND campaigns. Minimum: 1.
x >= 13
Maximum call attempts per lead per day. Required for OUTBOUND campaigns. Minimum: 1.
x >= 11
Minimum minutes between call attempts for a lead. Required for OUTBOUND campaigns. Minimum: 3.
x >= 360
When true, voicemail pickups count as answered and stop retries. Optional.
true
URL to receive campaign event webhooks. Optional.
"https://yourapp.com/webhooks/campaign"
Was this page helpful?

