Create campaign
curl --request POST \
--url https://app.autocalls.ai/api/user/campaign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"assistant_id": 123,
"timezone": "<string>",
"max_calls_in_parallel": 123,
"allowed_hours_start_time": "<string>",
"allowed_hours_end_time": "<string>",
"allowed_days": [
{}
],
"max_retries": 123,
"retry_interval": 123,
"retry_on_voicemail": true,
"retry_on_goal_incomplete": true,
"goal_completion_variable": "<string>",
"mark_complete_when_no_leads": true,
"phone_number_ids": [
{}
]
}
'import requests
url = "https://app.autocalls.ai/api/user/campaign"
payload = {
"name": "<string>",
"assistant_id": 123,
"timezone": "<string>",
"max_calls_in_parallel": 123,
"allowed_hours_start_time": "<string>",
"allowed_hours_end_time": "<string>",
"allowed_days": [{}],
"max_retries": 123,
"retry_interval": 123,
"retry_on_voicemail": True,
"retry_on_goal_incomplete": True,
"goal_completion_variable": "<string>",
"mark_complete_when_no_leads": True,
"phone_number_ids": [{}]
}
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>',
assistant_id: 123,
timezone: '<string>',
max_calls_in_parallel: 123,
allowed_hours_start_time: '<string>',
allowed_hours_end_time: '<string>',
allowed_days: [{}],
max_retries: 123,
retry_interval: 123,
retry_on_voicemail: true,
retry_on_goal_incomplete: true,
goal_completion_variable: '<string>',
mark_complete_when_no_leads: true,
phone_number_ids: [{}]
})
};
fetch('https://app.autocalls.ai/api/user/campaign', 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://app.autocalls.ai/api/user/campaign",
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>',
'assistant_id' => 123,
'timezone' => '<string>',
'max_calls_in_parallel' => 123,
'allowed_hours_start_time' => '<string>',
'allowed_hours_end_time' => '<string>',
'allowed_days' => [
[
]
],
'max_retries' => 123,
'retry_interval' => 123,
'retry_on_voicemail' => true,
'retry_on_goal_incomplete' => true,
'goal_completion_variable' => '<string>',
'mark_complete_when_no_leads' => true,
'phone_number_ids' => [
[
]
]
]),
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://app.autocalls.ai/api/user/campaign"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"assistant_id\": 123,\n \"timezone\": \"<string>\",\n \"max_calls_in_parallel\": 123,\n \"allowed_hours_start_time\": \"<string>\",\n \"allowed_hours_end_time\": \"<string>\",\n \"allowed_days\": [\n {}\n ],\n \"max_retries\": 123,\n \"retry_interval\": 123,\n \"retry_on_voicemail\": true,\n \"retry_on_goal_incomplete\": true,\n \"goal_completion_variable\": \"<string>\",\n \"mark_complete_when_no_leads\": true,\n \"phone_number_ids\": [\n {}\n ]\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://app.autocalls.ai/api/user/campaign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"assistant_id\": 123,\n \"timezone\": \"<string>\",\n \"max_calls_in_parallel\": 123,\n \"allowed_hours_start_time\": \"<string>\",\n \"allowed_hours_end_time\": \"<string>\",\n \"allowed_days\": [\n {}\n ],\n \"max_retries\": 123,\n \"retry_interval\": 123,\n \"retry_on_voicemail\": true,\n \"retry_on_goal_incomplete\": true,\n \"goal_completion_variable\": \"<string>\",\n \"mark_complete_when_no_leads\": true,\n \"phone_number_ids\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.autocalls.ai/api/user/campaign")
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 \"assistant_id\": 123,\n \"timezone\": \"<string>\",\n \"max_calls_in_parallel\": 123,\n \"allowed_hours_start_time\": \"<string>\",\n \"allowed_hours_end_time\": \"<string>\",\n \"allowed_days\": [\n {}\n ],\n \"max_retries\": 123,\n \"retry_interval\": 123,\n \"retry_on_voicemail\": true,\n \"retry_on_goal_incomplete\": true,\n \"goal_completion_variable\": \"<string>\",\n \"mark_complete_when_no_leads\": true,\n \"phone_number_ids\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Campaign created successfully",
"data": {
"id": 1,
"name": "Product Demo Campaign",
"status": "draft",
"max_calls_in_parallel": 3,
"mark_complete_when_no_leads": true,
"allowed_hours_start_time": "09:00:00",
"allowed_hours_end_time": "17:00:00",
"allowed_days": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"max_retries": 3,
"retry_interval": 60,
"created_at": "2026-02-23T10:00:00.000000Z",
"updated_at": "2026-02-23T10:00:00.000000Z"
}
}
{
"message": "You have reached the maximum number of campaigns allowed by your plan."
}
{
"message": "Assistant not found or not an outbound assistant."
}
{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
],
"assistant_id": [
"The assistant id field is required."
]
}
}
Campaigns
Create campaign
Create a new outbound calling campaign
POST
/
user
/
campaign
Create campaign
curl --request POST \
--url https://app.autocalls.ai/api/user/campaign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"assistant_id": 123,
"timezone": "<string>",
"max_calls_in_parallel": 123,
"allowed_hours_start_time": "<string>",
"allowed_hours_end_time": "<string>",
"allowed_days": [
{}
],
"max_retries": 123,
"retry_interval": 123,
"retry_on_voicemail": true,
"retry_on_goal_incomplete": true,
"goal_completion_variable": "<string>",
"mark_complete_when_no_leads": true,
"phone_number_ids": [
{}
]
}
'import requests
url = "https://app.autocalls.ai/api/user/campaign"
payload = {
"name": "<string>",
"assistant_id": 123,
"timezone": "<string>",
"max_calls_in_parallel": 123,
"allowed_hours_start_time": "<string>",
"allowed_hours_end_time": "<string>",
"allowed_days": [{}],
"max_retries": 123,
"retry_interval": 123,
"retry_on_voicemail": True,
"retry_on_goal_incomplete": True,
"goal_completion_variable": "<string>",
"mark_complete_when_no_leads": True,
"phone_number_ids": [{}]
}
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>',
assistant_id: 123,
timezone: '<string>',
max_calls_in_parallel: 123,
allowed_hours_start_time: '<string>',
allowed_hours_end_time: '<string>',
allowed_days: [{}],
max_retries: 123,
retry_interval: 123,
retry_on_voicemail: true,
retry_on_goal_incomplete: true,
goal_completion_variable: '<string>',
mark_complete_when_no_leads: true,
phone_number_ids: [{}]
})
};
fetch('https://app.autocalls.ai/api/user/campaign', 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://app.autocalls.ai/api/user/campaign",
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>',
'assistant_id' => 123,
'timezone' => '<string>',
'max_calls_in_parallel' => 123,
'allowed_hours_start_time' => '<string>',
'allowed_hours_end_time' => '<string>',
'allowed_days' => [
[
]
],
'max_retries' => 123,
'retry_interval' => 123,
'retry_on_voicemail' => true,
'retry_on_goal_incomplete' => true,
'goal_completion_variable' => '<string>',
'mark_complete_when_no_leads' => true,
'phone_number_ids' => [
[
]
]
]),
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://app.autocalls.ai/api/user/campaign"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"assistant_id\": 123,\n \"timezone\": \"<string>\",\n \"max_calls_in_parallel\": 123,\n \"allowed_hours_start_time\": \"<string>\",\n \"allowed_hours_end_time\": \"<string>\",\n \"allowed_days\": [\n {}\n ],\n \"max_retries\": 123,\n \"retry_interval\": 123,\n \"retry_on_voicemail\": true,\n \"retry_on_goal_incomplete\": true,\n \"goal_completion_variable\": \"<string>\",\n \"mark_complete_when_no_leads\": true,\n \"phone_number_ids\": [\n {}\n ]\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://app.autocalls.ai/api/user/campaign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"assistant_id\": 123,\n \"timezone\": \"<string>\",\n \"max_calls_in_parallel\": 123,\n \"allowed_hours_start_time\": \"<string>\",\n \"allowed_hours_end_time\": \"<string>\",\n \"allowed_days\": [\n {}\n ],\n \"max_retries\": 123,\n \"retry_interval\": 123,\n \"retry_on_voicemail\": true,\n \"retry_on_goal_incomplete\": true,\n \"goal_completion_variable\": \"<string>\",\n \"mark_complete_when_no_leads\": true,\n \"phone_number_ids\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.autocalls.ai/api/user/campaign")
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 \"assistant_id\": 123,\n \"timezone\": \"<string>\",\n \"max_calls_in_parallel\": 123,\n \"allowed_hours_start_time\": \"<string>\",\n \"allowed_hours_end_time\": \"<string>\",\n \"allowed_days\": [\n {}\n ],\n \"max_retries\": 123,\n \"retry_interval\": 123,\n \"retry_on_voicemail\": true,\n \"retry_on_goal_incomplete\": true,\n \"goal_completion_variable\": \"<string>\",\n \"mark_complete_when_no_leads\": true,\n \"phone_number_ids\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Campaign created successfully",
"data": {
"id": 1,
"name": "Product Demo Campaign",
"status": "draft",
"max_calls_in_parallel": 3,
"mark_complete_when_no_leads": true,
"allowed_hours_start_time": "09:00:00",
"allowed_hours_end_time": "17:00:00",
"allowed_days": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"max_retries": 3,
"retry_interval": 60,
"created_at": "2026-02-23T10:00:00.000000Z",
"updated_at": "2026-02-23T10:00:00.000000Z"
}
}
{
"message": "You have reached the maximum number of campaigns allowed by your plan."
}
{
"message": "Assistant not found or not an outbound assistant."
}
{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
],
"assistant_id": [
"The assistant id field is required."
]
}
}
This endpoint allows you to create a new outbound calling campaign with the specified configuration.
Request body
The name of the campaign. Maximum 255 characters.
The ID of the assistant to use for the campaign. Must be an outbound-capable assistant.
Timezone identifier for the campaign (e.g.,
America/New_York, Europe/London). Defaults to your account timezone.Maximum number of simultaneous calls. Minimum: 1. Maximum depends on your plan’s parallel calls limit (up to 10).
Start of the allowed calling window in
H:i format (e.g., 09:00).End of the allowed calling window in
H:i format (e.g., 17:00).Array of weekday names when calls are allowed. Valid values:
monday, tuesday, wednesday, thursday, friday, saturday, sunday.Maximum number of retry attempts for failed calls. Range: 1-5.
Interval in minutes between retry attempts. Range: 10-4320 (up to 3 days).
Whether to retry calls that reached voicemail.
Whether to retry calls where the goal was not completed.
Name of a boolean variable from your assistant’s post-call schema to track goal completion. Maximum 255 characters.
Whether to automatically mark the campaign as complete when there are no remaining leads to call.
Array of phone number IDs to use for the campaign. Each ID must be a distinct integer.
Response
Success message confirming the campaign was created
The created campaign data
Show data properties
Show data properties
The ID of the created campaign
The name of the campaign
The status of the campaign (starts as
draft)Maximum number of simultaneous calls
Whether to mark the campaign as complete when there are no leads
Start of the allowed calling window
End of the allowed calling window
Days of the week when calls are allowed
Maximum number of retry attempts
Interval in minutes between retries
Timestamp when the campaign was created
Timestamp when the campaign was last updated
Error Responses
403 Forbidden
Show Error Response
Show Error Response
Error message when the user has reached their plan’s campaign limit
404 Not Found
Show Error Response
Show Error Response
Error message when the specified assistant is not found or is not an outbound assistant
422 Validation Error
{
"message": "Campaign created successfully",
"data": {
"id": 1,
"name": "Product Demo Campaign",
"status": "draft",
"max_calls_in_parallel": 3,
"mark_complete_when_no_leads": true,
"allowed_hours_start_time": "09:00:00",
"allowed_hours_end_time": "17:00:00",
"allowed_days": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"max_retries": 3,
"retry_interval": 60,
"created_at": "2026-02-23T10:00:00.000000Z",
"updated_at": "2026-02-23T10:00:00.000000Z"
}
}
{
"message": "You have reached the maximum number of campaigns allowed by your plan."
}
{
"message": "Assistant not found or not an outbound assistant."
}
{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
],
"assistant_id": [
"The assistant id field is required."
]
}
}
⌘I

