Update batch call (full)
curl --request PUT \
--url https://api.zudu.ai/batch-call/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-API-SECRET: <api-key>' \
--data '
{
"from_number": "+14157774444",
"tasks": [
{
"to_number": "+12137774445",
"dynamic_variables": {
"first_name": "John"
},
"max_retries": 3
}
],
"name": "Updated Campaign Name",
"trigger_timestamp": 1735718500000,
"agent_id": "agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03",
"timezone": "UTC",
"status": "scheduled",
"send_now": false
}
'import requests
url = "https://api.zudu.ai/batch-call/{id}"
payload = {
"from_number": "+14157774444",
"tasks": [
{
"to_number": "+12137774445",
"dynamic_variables": { "first_name": "John" },
"max_retries": 3
}
],
"name": "Updated Campaign Name",
"trigger_timestamp": 1735718500000,
"agent_id": "agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03",
"timezone": "UTC",
"status": "scheduled",
"send_now": False
}
headers = {
"X-API-KEY": "<api-key>",
"X-API-SECRET": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-API-KEY': '<api-key>',
'X-API-SECRET': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from_number: '+14157774444',
tasks: [
{
to_number: '+12137774445',
dynamic_variables: {first_name: 'John'},
max_retries: 3
}
],
name: 'Updated Campaign Name',
trigger_timestamp: 1735718500000,
agent_id: 'agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03',
timezone: 'UTC',
status: 'scheduled',
send_now: false
})
};
fetch('https://api.zudu.ai/batch-call/{id}', 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.zudu.ai/batch-call/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'from_number' => '+14157774444',
'tasks' => [
[
'to_number' => '+12137774445',
'dynamic_variables' => [
'first_name' => 'John'
],
'max_retries' => 3
]
],
'name' => 'Updated Campaign Name',
'trigger_timestamp' => 1735718500000,
'agent_id' => 'agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03',
'timezone' => 'UTC',
'status' => 'scheduled',
'send_now' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-API-SECRET: <api-key>"
],
]);
$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.zudu.ai/batch-call/{id}"
payload := strings.NewReader("{\n \"from_number\": \"+14157774444\",\n \"tasks\": [\n {\n \"to_number\": \"+12137774445\",\n \"dynamic_variables\": {\n \"first_name\": \"John\"\n },\n \"max_retries\": 3\n }\n ],\n \"name\": \"Updated Campaign Name\",\n \"trigger_timestamp\": 1735718500000,\n \"agent_id\": \"agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03\",\n \"timezone\": \"UTC\",\n \"status\": \"scheduled\",\n \"send_now\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-API-SECRET", "<api-key>")
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.put("https://api.zudu.ai/batch-call/{id}")
.header("X-API-KEY", "<api-key>")
.header("X-API-SECRET", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from_number\": \"+14157774444\",\n \"tasks\": [\n {\n \"to_number\": \"+12137774445\",\n \"dynamic_variables\": {\n \"first_name\": \"John\"\n },\n \"max_retries\": 3\n }\n ],\n \"name\": \"Updated Campaign Name\",\n \"trigger_timestamp\": 1735718500000,\n \"agent_id\": \"agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03\",\n \"timezone\": \"UTC\",\n \"status\": \"scheduled\",\n \"send_now\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zudu.ai/batch-call/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["X-API-SECRET"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from_number\": \"+14157774444\",\n \"tasks\": [\n {\n \"to_number\": \"+12137774445\",\n \"dynamic_variables\": {\n \"first_name\": \"John\"\n },\n \"max_retries\": 3\n }\n ],\n \"name\": \"Updated Campaign Name\",\n \"trigger_timestamp\": 1735718500000,\n \"agent_id\": \"agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03\",\n \"timezone\": \"UTC\",\n \"status\": \"scheduled\",\n \"send_now\": false\n}"
response = http.request(request)
puts response.read_body{
"message": "Batch call updated successfully",
"status": "success",
"error": null,
"data": {
"batch_call_id": "batch_call_a1b2c3d4e5f6789012345678901234567",
"name": "Updated Campaign Name",
"from_number": "+14157774444",
"scheduled_timestamp": 1735718500000,
"total_task_count": 1,
"total": 1,
"sent": 0,
"picked_up": 0,
"completed": 0,
"agent_id": "agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03",
"organization_id": "e3yn0c4mivqs8y4yhb5k",
"status": "scheduled",
"timezone": "UTC",
"last_sent_timestamp": null,
"tasks_url": "https://storage.azure.com/.../tasks.json",
"created_timestamp": 1735718400000
}
}{
"message": "Invalid request",
"status": "error",
"error": "Batch call ID must be in format: batch_call_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (32 hex characters)",
"data": null
}{
"message": "Access denied",
"status": "error",
"error": "Batch call does not belong to your organization",
"data": null
}{
"message": "Batch call not found",
"status": "error",
"error": "Batch call with ID batch_call_xxx does not exist",
"data": null
}{
"message": "Cannot update batch call",
"status": "error",
"error": "Cannot update running batch call",
"data": null
}Batch Calls
Update batch call
Updates a batch call by ID.
PUT
/
batch-call
/
{id}
Update batch call (full)
curl --request PUT \
--url https://api.zudu.ai/batch-call/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-API-SECRET: <api-key>' \
--data '
{
"from_number": "+14157774444",
"tasks": [
{
"to_number": "+12137774445",
"dynamic_variables": {
"first_name": "John"
},
"max_retries": 3
}
],
"name": "Updated Campaign Name",
"trigger_timestamp": 1735718500000,
"agent_id": "agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03",
"timezone": "UTC",
"status": "scheduled",
"send_now": false
}
'import requests
url = "https://api.zudu.ai/batch-call/{id}"
payload = {
"from_number": "+14157774444",
"tasks": [
{
"to_number": "+12137774445",
"dynamic_variables": { "first_name": "John" },
"max_retries": 3
}
],
"name": "Updated Campaign Name",
"trigger_timestamp": 1735718500000,
"agent_id": "agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03",
"timezone": "UTC",
"status": "scheduled",
"send_now": False
}
headers = {
"X-API-KEY": "<api-key>",
"X-API-SECRET": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-API-KEY': '<api-key>',
'X-API-SECRET': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from_number: '+14157774444',
tasks: [
{
to_number: '+12137774445',
dynamic_variables: {first_name: 'John'},
max_retries: 3
}
],
name: 'Updated Campaign Name',
trigger_timestamp: 1735718500000,
agent_id: 'agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03',
timezone: 'UTC',
status: 'scheduled',
send_now: false
})
};
fetch('https://api.zudu.ai/batch-call/{id}', 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.zudu.ai/batch-call/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'from_number' => '+14157774444',
'tasks' => [
[
'to_number' => '+12137774445',
'dynamic_variables' => [
'first_name' => 'John'
],
'max_retries' => 3
]
],
'name' => 'Updated Campaign Name',
'trigger_timestamp' => 1735718500000,
'agent_id' => 'agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03',
'timezone' => 'UTC',
'status' => 'scheduled',
'send_now' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-API-SECRET: <api-key>"
],
]);
$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.zudu.ai/batch-call/{id}"
payload := strings.NewReader("{\n \"from_number\": \"+14157774444\",\n \"tasks\": [\n {\n \"to_number\": \"+12137774445\",\n \"dynamic_variables\": {\n \"first_name\": \"John\"\n },\n \"max_retries\": 3\n }\n ],\n \"name\": \"Updated Campaign Name\",\n \"trigger_timestamp\": 1735718500000,\n \"agent_id\": \"agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03\",\n \"timezone\": \"UTC\",\n \"status\": \"scheduled\",\n \"send_now\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-API-SECRET", "<api-key>")
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.put("https://api.zudu.ai/batch-call/{id}")
.header("X-API-KEY", "<api-key>")
.header("X-API-SECRET", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from_number\": \"+14157774444\",\n \"tasks\": [\n {\n \"to_number\": \"+12137774445\",\n \"dynamic_variables\": {\n \"first_name\": \"John\"\n },\n \"max_retries\": 3\n }\n ],\n \"name\": \"Updated Campaign Name\",\n \"trigger_timestamp\": 1735718500000,\n \"agent_id\": \"agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03\",\n \"timezone\": \"UTC\",\n \"status\": \"scheduled\",\n \"send_now\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zudu.ai/batch-call/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["X-API-SECRET"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from_number\": \"+14157774444\",\n \"tasks\": [\n {\n \"to_number\": \"+12137774445\",\n \"dynamic_variables\": {\n \"first_name\": \"John\"\n },\n \"max_retries\": 3\n }\n ],\n \"name\": \"Updated Campaign Name\",\n \"trigger_timestamp\": 1735718500000,\n \"agent_id\": \"agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03\",\n \"timezone\": \"UTC\",\n \"status\": \"scheduled\",\n \"send_now\": false\n}"
response = http.request(request)
puts response.read_body{
"message": "Batch call updated successfully",
"status": "success",
"error": null,
"data": {
"batch_call_id": "batch_call_a1b2c3d4e5f6789012345678901234567",
"name": "Updated Campaign Name",
"from_number": "+14157774444",
"scheduled_timestamp": 1735718500000,
"total_task_count": 1,
"total": 1,
"sent": 0,
"picked_up": 0,
"completed": 0,
"agent_id": "agent_7ff47846-c8a0-4304-ae13-88cfc31c1a03",
"organization_id": "e3yn0c4mivqs8y4yhb5k",
"status": "scheduled",
"timezone": "UTC",
"last_sent_timestamp": null,
"tasks_url": "https://storage.azure.com/.../tasks.json",
"created_timestamp": 1735718400000
}
}{
"message": "Invalid request",
"status": "error",
"error": "Batch call ID must be in format: batch_call_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (32 hex characters)",
"data": null
}{
"message": "Access denied",
"status": "error",
"error": "Batch call does not belong to your organization",
"data": null
}{
"message": "Batch call not found",
"status": "error",
"error": "Batch call with ID batch_call_xxx does not exist",
"data": null
}{
"message": "Cannot update batch call",
"status": "error",
"error": "Cannot update running batch call",
"data": null
}Notes
- Only
draftorscheduledbatch calls can be updated.
Authorizations
API Key for MCP server and external service authentication
API Secret for MCP server and external service authentication
Path Parameters
Batch call ID
Example:
"batch_call_a1b2c3d4e5f6789012345678901234567"
Body
application/json
⌘I