Upload Calls
curl --request POST \
--url https://api-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"phone_number": "+12065551234",
"override_timezone": "America/Chicago",
"patientId": "P-12345",
"insuranceId": "INS-67890"
}
]
'import requests
url = "https://api-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls"
payload = [
{
"phone_number": "+12065551234",
"override_timezone": "America/Chicago",
"patientId": "P-12345",
"insuranceId": "INS-67890"
}
]
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([
{
phone_number: '+12065551234',
override_timezone: 'America/Chicago',
patientId: 'P-12345',
insuranceId: 'INS-67890'
}
])
};
fetch('https://api-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls', 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-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls",
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([
[
'phone_number' => '+12065551234',
'override_timezone' => 'America/Chicago',
'patientId' => 'P-12345',
'insuranceId' => 'INS-67890'
]
]),
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-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls"
payload := strings.NewReader("[\n {\n \"phone_number\": \"+12065551234\",\n \"override_timezone\": \"America/Chicago\",\n \"patientId\": \"P-12345\",\n \"insuranceId\": \"INS-67890\"\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://api-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"phone_number\": \"+12065551234\",\n \"override_timezone\": \"America/Chicago\",\n \"patientId\": \"P-12345\",\n \"insuranceId\": \"INS-67890\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls")
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 {\n \"phone_number\": \"+12065551234\",\n \"override_timezone\": \"America/Chicago\",\n \"patientId\": \"P-12345\",\n \"insuranceId\": \"INS-67890\"\n }\n]"
response = http.request(request)
puts response.read_body{
"message": "Received batch calls triggers successfully.",
"data": {
"callIds": [
"<string>"
],
"requestId": "<string>"
}
}{
"message": "Resource not found."
}{
"message": "Resource not found."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"message": "Resource not found."
}Campaigns Calls
Upload Calls
Upload a batch of call records to a campaign.
Request body: A JSON array of call objects. Each object must include a phone_number field.
Along with optional override_assistant_id, override_schedule and override_timezone fields
and you can include any additional fields relevant to the call (e.g. patientId, insuranceId, etc.).
These extra fields are dynamic variables from attached assistant or workflow and will be stored as part of the call record’s payload for use in the campaign.
Calls can be uploaded while the campaign is already running — they will be picked up automatically.
Returns 202 Accepted immediately; actual call processing happens asynchronously.
POST
/
campaigns
/
v1
/
campaigns
/
{campaign_id}
/
calls
Upload Calls
curl --request POST \
--url https://api-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"phone_number": "+12065551234",
"override_timezone": "America/Chicago",
"patientId": "P-12345",
"insuranceId": "INS-67890"
}
]
'import requests
url = "https://api-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls"
payload = [
{
"phone_number": "+12065551234",
"override_timezone": "America/Chicago",
"patientId": "P-12345",
"insuranceId": "INS-67890"
}
]
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([
{
phone_number: '+12065551234',
override_timezone: 'America/Chicago',
patientId: 'P-12345',
insuranceId: 'INS-67890'
}
])
};
fetch('https://api-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls', 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-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls",
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([
[
'phone_number' => '+12065551234',
'override_timezone' => 'America/Chicago',
'patientId' => 'P-12345',
'insuranceId' => 'INS-67890'
]
]),
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-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls"
payload := strings.NewReader("[\n {\n \"phone_number\": \"+12065551234\",\n \"override_timezone\": \"America/Chicago\",\n \"patientId\": \"P-12345\",\n \"insuranceId\": \"INS-67890\"\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://api-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"phone_number\": \"+12065551234\",\n \"override_timezone\": \"America/Chicago\",\n \"patientId\": \"P-12345\",\n \"insuranceId\": \"INS-67890\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/campaigns/v1/campaigns/{campaign_id}/calls")
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 {\n \"phone_number\": \"+12065551234\",\n \"override_timezone\": \"America/Chicago\",\n \"patientId\": \"P-12345\",\n \"insuranceId\": \"INS-67890\"\n }\n]"
response = http.request(request)
puts response.read_body{
"message": "Received batch calls triggers successfully.",
"data": {
"callIds": [
"<string>"
],
"requestId": "<string>"
}
}{
"message": "Resource not found."
}{
"message": "Resource not found."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"message": "Resource not found."
}Authorizations
Retrieve your API Key from Dashboard API Keys Section.
Path Parameters
Body
application/json
Response
Successful Response