Create a campaign
curl --request POST \
--url https://api.kataven.ai/v1/api/v1/campaigns \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'name=<string>' \
--data 'agent_id=<string>' \
--data 'phone_number_id=<string>' \
--data max_concurrent_calls=123 \
--data retries_per_contact=123 \
--data retry_delay_seconds=123 \
--data 'scheduled_at=<string>' \
--data 'contacts=<string>'import requests
url = "https://api.kataven.ai/v1/api/v1/campaigns"
payload = {
"name": "<string>",
"agent_id": "<string>",
"phone_number_id": "<string>",
"max_concurrent_calls": "123",
"retries_per_contact": "123",
"retry_delay_seconds": "123",
"scheduled_at": "<string>",
"contacts": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
name: '<string>',
agent_id: '<string>',
phone_number_id: '<string>',
max_concurrent_calls: '123',
retries_per_contact: '123',
retry_delay_seconds: '123',
scheduled_at: '<string>',
contacts: '<string>'
})
};
fetch('https://api.kataven.ai/v1/api/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.kataven.ai/v1/api/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 => "name=%3Cstring%3E&agent_id=%3Cstring%3E&phone_number_id=%3Cstring%3E&max_concurrent_calls=123&retries_per_contact=123&retry_delay_seconds=123&scheduled_at=%3Cstring%3E&contacts=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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.kataven.ai/v1/api/v1/campaigns"
payload := strings.NewReader("name=%3Cstring%3E&agent_id=%3Cstring%3E&phone_number_id=%3Cstring%3E&max_concurrent_calls=123&retries_per_contact=123&retry_delay_seconds=123&scheduled_at=%3Cstring%3E&contacts=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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.kataven.ai/v1/api/v1/campaigns")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("name=%3Cstring%3E&agent_id=%3Cstring%3E&phone_number_id=%3Cstring%3E&max_concurrent_calls=123&retries_per_contact=123&retry_delay_seconds=123&scheduled_at=%3Cstring%3E&contacts=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kataven.ai/v1/api/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "name=%3Cstring%3E&agent_id=%3Cstring%3E&phone_number_id=%3Cstring%3E&max_concurrent_calls=123&retries_per_contact=123&retry_delay_seconds=123&scheduled_at=%3Cstring%3E&contacts=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"completed_at": "<string>",
"created_at": "<string>",
"created_by": "<string>",
"id": "<string>",
"max_concurrent_calls": 123,
"name": "<string>",
"phone_number_id": "<string>",
"retries_per_contact": 123,
"retry_delay_seconds": 123,
"scheduled_at": "<string>",
"started_at": "<string>",
"status": "<string>"
}"<string>""<string>"Campaigns
Create a campaign
Multipart form upload — contacts is a CSV file, every other field is a form value. The CSV must contain at least a phone_number column. The campaign is created in draft state and dispatch starts only after start.
POST
/
api
/
v1
/
campaigns
Create a campaign
curl --request POST \
--url https://api.kataven.ai/v1/api/v1/campaigns \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'name=<string>' \
--data 'agent_id=<string>' \
--data 'phone_number_id=<string>' \
--data max_concurrent_calls=123 \
--data retries_per_contact=123 \
--data retry_delay_seconds=123 \
--data 'scheduled_at=<string>' \
--data 'contacts=<string>'import requests
url = "https://api.kataven.ai/v1/api/v1/campaigns"
payload = {
"name": "<string>",
"agent_id": "<string>",
"phone_number_id": "<string>",
"max_concurrent_calls": "123",
"retries_per_contact": "123",
"retry_delay_seconds": "123",
"scheduled_at": "<string>",
"contacts": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
name: '<string>',
agent_id: '<string>',
phone_number_id: '<string>',
max_concurrent_calls: '123',
retries_per_contact: '123',
retry_delay_seconds: '123',
scheduled_at: '<string>',
contacts: '<string>'
})
};
fetch('https://api.kataven.ai/v1/api/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.kataven.ai/v1/api/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 => "name=%3Cstring%3E&agent_id=%3Cstring%3E&phone_number_id=%3Cstring%3E&max_concurrent_calls=123&retries_per_contact=123&retry_delay_seconds=123&scheduled_at=%3Cstring%3E&contacts=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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.kataven.ai/v1/api/v1/campaigns"
payload := strings.NewReader("name=%3Cstring%3E&agent_id=%3Cstring%3E&phone_number_id=%3Cstring%3E&max_concurrent_calls=123&retries_per_contact=123&retry_delay_seconds=123&scheduled_at=%3Cstring%3E&contacts=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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.kataven.ai/v1/api/v1/campaigns")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("name=%3Cstring%3E&agent_id=%3Cstring%3E&phone_number_id=%3Cstring%3E&max_concurrent_calls=123&retries_per_contact=123&retry_delay_seconds=123&scheduled_at=%3Cstring%3E&contacts=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kataven.ai/v1/api/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "name=%3Cstring%3E&agent_id=%3Cstring%3E&phone_number_id=%3Cstring%3E&max_concurrent_calls=123&retries_per_contact=123&retry_delay_seconds=123&scheduled_at=%3Cstring%3E&contacts=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"completed_at": "<string>",
"created_at": "<string>",
"created_by": "<string>",
"id": "<string>",
"max_concurrent_calls": 123,
"name": "<string>",
"phone_number_id": "<string>",
"retries_per_contact": 123,
"retry_delay_seconds": 123,
"scheduled_at": "<string>",
"started_at": "<string>",
"status": "<string>"
}"<string>""<string>"Authorizations
Headers
Tenant database. Required when using a Zitadel JWT.
Body
application/x-www-form-urlencodedmultipart/form-data
Campaign name | Agent uuid | Phone number uuid | 1-100 (default 5) | 0-5 (default 0) | ≥60 (default 300) | RFC3339 timestamp; rejected if in the past | CSV file

