Create a campaign
curl --request POST \
--url https://api.vonative.com/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"phone_number_id": "<string>",
"max_concurrent_calls": 25,
"retry_attempts": 2,
"retry_delay_minutes": 720,
"assistant_id": "<string>",
"workflow_id": "<string>",
"customers": [],
"schedule_plan": {}
}
'import requests
url = "https://api.vonative.com/v1/campaigns"
payload = {
"name": "<string>",
"phone_number_id": "<string>",
"max_concurrent_calls": 25,
"retry_attempts": 2,
"retry_delay_minutes": 720,
"assistant_id": "<string>",
"workflow_id": "<string>",
"customers": [],
"schedule_plan": {}
}
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: '<string>',
phone_number_id: '<string>',
max_concurrent_calls: 25,
retry_attempts: 2,
retry_delay_minutes: 720,
assistant_id: '<string>',
workflow_id: '<string>',
customers: [],
schedule_plan: {}
})
};
fetch('https://api.vonative.com/v1/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.vonative.com/v1/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' => '<string>',
'phone_number_id' => '<string>',
'max_concurrent_calls' => 25,
'retry_attempts' => 2,
'retry_delay_minutes' => 720,
'assistant_id' => '<string>',
'workflow_id' => '<string>',
'customers' => [
],
'schedule_plan' => [
]
]),
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.vonative.com/v1/campaigns"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"max_concurrent_calls\": 25,\n \"retry_attempts\": 2,\n \"retry_delay_minutes\": 720,\n \"assistant_id\": \"<string>\",\n \"workflow_id\": \"<string>\",\n \"customers\": [],\n \"schedule_plan\": {}\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.vonative.com/v1/campaigns")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"max_concurrent_calls\": 25,\n \"retry_attempts\": 2,\n \"retry_delay_minutes\": 720,\n \"assistant_id\": \"<string>\",\n \"workflow_id\": \"<string>\",\n \"customers\": [],\n \"schedule_plan\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vonative.com/v1/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\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"max_concurrent_calls\": 25,\n \"retry_attempts\": 2,\n \"retry_delay_minutes\": 720,\n \"assistant_id\": \"<string>\",\n \"workflow_id\": \"<string>\",\n \"customers\": [],\n \"schedule_plan\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "success",
"data": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"status": "<string>",
"phone_number_id": "<string>",
"total_cost": "<string>",
"organization_id": "<string>",
"created_by": "<string>",
"ended_reason": "<string>",
"vapi_id": "<string>",
"assistant_id": "<string>",
"vapi_assistant_id": "<string>",
"workflow_id": "<string>",
"customers": [],
"schedule_plan": {},
"calls_counter_scheduled": 0,
"calls_counter_queued": 0,
"calls_counter_in_progress": 0,
"calls_counter_ended_voicemail": 0,
"calls_counter_ended": 0,
"max_concurrent_calls": 5,
"retry_attempts": 3,
"retry_delay_minutes": 5,
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Campaigns
Create a campaign
Create an outbound campaign. Add contacts, then start it.
POST
/
v1
/
campaigns
Create a campaign
curl --request POST \
--url https://api.vonative.com/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"phone_number_id": "<string>",
"max_concurrent_calls": 25,
"retry_attempts": 2,
"retry_delay_minutes": 720,
"assistant_id": "<string>",
"workflow_id": "<string>",
"customers": [],
"schedule_plan": {}
}
'import requests
url = "https://api.vonative.com/v1/campaigns"
payload = {
"name": "<string>",
"phone_number_id": "<string>",
"max_concurrent_calls": 25,
"retry_attempts": 2,
"retry_delay_minutes": 720,
"assistant_id": "<string>",
"workflow_id": "<string>",
"customers": [],
"schedule_plan": {}
}
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: '<string>',
phone_number_id: '<string>',
max_concurrent_calls: 25,
retry_attempts: 2,
retry_delay_minutes: 720,
assistant_id: '<string>',
workflow_id: '<string>',
customers: [],
schedule_plan: {}
})
};
fetch('https://api.vonative.com/v1/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.vonative.com/v1/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' => '<string>',
'phone_number_id' => '<string>',
'max_concurrent_calls' => 25,
'retry_attempts' => 2,
'retry_delay_minutes' => 720,
'assistant_id' => '<string>',
'workflow_id' => '<string>',
'customers' => [
],
'schedule_plan' => [
]
]),
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.vonative.com/v1/campaigns"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"max_concurrent_calls\": 25,\n \"retry_attempts\": 2,\n \"retry_delay_minutes\": 720,\n \"assistant_id\": \"<string>\",\n \"workflow_id\": \"<string>\",\n \"customers\": [],\n \"schedule_plan\": {}\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.vonative.com/v1/campaigns")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"max_concurrent_calls\": 25,\n \"retry_attempts\": 2,\n \"retry_delay_minutes\": 720,\n \"assistant_id\": \"<string>\",\n \"workflow_id\": \"<string>\",\n \"customers\": [],\n \"schedule_plan\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vonative.com/v1/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\": \"<string>\",\n \"phone_number_id\": \"<string>\",\n \"max_concurrent_calls\": 25,\n \"retry_attempts\": 2,\n \"retry_delay_minutes\": 720,\n \"assistant_id\": \"<string>\",\n \"workflow_id\": \"<string>\",\n \"customers\": [],\n \"schedule_plan\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "success",
"data": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"status": "<string>",
"phone_number_id": "<string>",
"total_cost": "<string>",
"organization_id": "<string>",
"created_by": "<string>",
"ended_reason": "<string>",
"vapi_id": "<string>",
"assistant_id": "<string>",
"vapi_assistant_id": "<string>",
"workflow_id": "<string>",
"customers": [],
"schedule_plan": {},
"calls_counter_scheduled": 0,
"calls_counter_queued": 0,
"calls_counter_in_progress": 0,
"calls_counter_ended_voicemail": 0,
"calls_counter_ended": 0,
"max_concurrent_calls": 5,
"retry_attempts": 3,
"retry_delay_minutes": 5,
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
An API key from Dashboard → Developers → API keys.
Body
application/json
Required range:
1 <= x <= 50Required range:
0 <= x <= 5Required range:
1 <= x <= 1440Response
Successful Response
Campaign response schema with UUID-based identification.
Inherits from UUIDResponseBase which maps uuid → id and excludes integer PK. Integer FK fields (organization_id, created_by) are resolved to UUIDs from loaded relationships. String-typed Vapi IDs (assistant_id, phone_number_id, workflow_id) are preserved unchanged.
Show child attributes
Show child attributes
⌘I

