curl --request PATCH \
--url https://api.talqing.com/v1/calls/batches/{batch_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"calling_window": {
"end": "<string>",
"start": "<string>",
"days": [
1,
2,
3,
4,
5,
6,
7
]
},
"dial_daily_cap": {
"kind": "fixed",
"limit": 2
},
"dial_gap_seconds": 123,
"from_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_attempts": 123,
"max_concurrency": 123,
"name": "<string>",
"retry_after_minutes": 123,
"start_at": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
'import requests
url = "https://api.talqing.com/v1/calls/batches/{batch_id}"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"calling_window": {
"end": "<string>",
"start": "<string>",
"days": [1, 2, 3, 4, 5, 6, 7]
},
"dial_daily_cap": {
"kind": "fixed",
"limit": 2
},
"dial_gap_seconds": 123,
"from_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_attempts": 123,
"max_concurrency": 123,
"name": "<string>",
"retry_after_minutes": 123,
"start_at": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
calling_window: {end: '<string>', start: '<string>', days: [1, 2, 3, 4, 5, 6, 7]},
dial_daily_cap: {kind: 'fixed', limit: 2},
dial_gap_seconds: 123,
from_phone_number_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
max_attempts: 123,
max_concurrency: 123,
name: '<string>',
retry_after_minutes: 123,
start_at: '2023-11-07T05:31:56Z',
timezone: '<string>'
})
};
fetch('https://api.talqing.com/v1/calls/batches/{batch_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.talqing.com/v1/calls/batches/{batch_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'calling_window' => [
'end' => '<string>',
'start' => '<string>',
'days' => [
1,
2,
3,
4,
5,
6,
7
]
],
'dial_daily_cap' => [
'kind' => 'fixed',
'limit' => 2
],
'dial_gap_seconds' => 123,
'from_phone_number_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'max_attempts' => 123,
'max_concurrency' => 123,
'name' => '<string>',
'retry_after_minutes' => 123,
'start_at' => '2023-11-07T05:31:56Z',
'timezone' => '<string>'
]),
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.talqing.com/v1/calls/batches/{batch_id}"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"calling_window\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\",\n \"days\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7\n ]\n },\n \"dial_daily_cap\": {\n \"kind\": \"fixed\",\n \"limit\": 2\n },\n \"dial_gap_seconds\": 123,\n \"from_phone_number_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_attempts\": 123,\n \"max_concurrency\": 123,\n \"name\": \"<string>\",\n \"retry_after_minutes\": 123,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.talqing.com/v1/calls/batches/{batch_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"calling_window\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\",\n \"days\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7\n ]\n },\n \"dial_daily_cap\": {\n \"kind\": \"fixed\",\n \"limit\": 2\n },\n \"dial_gap_seconds\": 123,\n \"from_phone_number_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_attempts\": 123,\n \"max_concurrency\": 123,\n \"name\": \"<string>\",\n \"retry_after_minutes\": 123,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talqing.com/v1/calls/batches/{batch_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"calling_window\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\",\n \"days\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7\n ]\n },\n \"dial_daily_cap\": {\n \"kind\": \"fixed\",\n \"limit\": 2\n },\n \"dial_gap_seconds\": 123,\n \"from_phone_number_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_attempts\": 123,\n \"max_concurrency\": 123,\n \"name\": \"<string>\",\n \"retry_after_minutes\": 123,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_name": "<string>",
"calling_window": {
"end": "<string>",
"start": "<string>",
"days": [
1,
2,
3,
4,
5,
6,
7
]
},
"counts": {
"canceled": 123,
"completed": 123,
"dialing": 123,
"failed": 123,
"pending": 123,
"total": 123,
"voicemail": 123
},
"created_at": "2023-11-07T05:31:56Z",
"dial_daily_cap": {
"kind": "fixed",
"limit": 2
},
"dial_daily_cap_today": 123,
"dial_gap_seconds": 123,
"dialed_today": 123,
"ended_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>",
"from_e164": "<string>",
"from_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_attempts": 123,
"max_concurrency": 123,
"name": "<string>",
"next_dial_at": "2023-11-07T05:31:56Z",
"next_dial_reason": "start",
"retry_after_minutes": 123,
"start_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"status": "scheduled",
"timezone": "<string>",
"agent_plan": {
"members": [
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"override": {},
"version": 123
}
]
},
"vars": {}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}Patch Call Batch
Change a batch’s policy while it runs or after it completes. The next pass reads it.
Everything here is policy, so nothing revisits a recipient already called,
and calls in flight finish under the policy they were dispatched with. You
do not need this to pick up a republished prompt — every call already runs
the current published version. start_at moves only while the batch is
still scheduled.
curl --request PATCH \
--url https://api.talqing.com/v1/calls/batches/{batch_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"calling_window": {
"end": "<string>",
"start": "<string>",
"days": [
1,
2,
3,
4,
5,
6,
7
]
},
"dial_daily_cap": {
"kind": "fixed",
"limit": 2
},
"dial_gap_seconds": 123,
"from_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_attempts": 123,
"max_concurrency": 123,
"name": "<string>",
"retry_after_minutes": 123,
"start_at": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
'import requests
url = "https://api.talqing.com/v1/calls/batches/{batch_id}"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"calling_window": {
"end": "<string>",
"start": "<string>",
"days": [1, 2, 3, 4, 5, 6, 7]
},
"dial_daily_cap": {
"kind": "fixed",
"limit": 2
},
"dial_gap_seconds": 123,
"from_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_attempts": 123,
"max_concurrency": 123,
"name": "<string>",
"retry_after_minutes": 123,
"start_at": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
calling_window: {end: '<string>', start: '<string>', days: [1, 2, 3, 4, 5, 6, 7]},
dial_daily_cap: {kind: 'fixed', limit: 2},
dial_gap_seconds: 123,
from_phone_number_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
max_attempts: 123,
max_concurrency: 123,
name: '<string>',
retry_after_minutes: 123,
start_at: '2023-11-07T05:31:56Z',
timezone: '<string>'
})
};
fetch('https://api.talqing.com/v1/calls/batches/{batch_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.talqing.com/v1/calls/batches/{batch_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'calling_window' => [
'end' => '<string>',
'start' => '<string>',
'days' => [
1,
2,
3,
4,
5,
6,
7
]
],
'dial_daily_cap' => [
'kind' => 'fixed',
'limit' => 2
],
'dial_gap_seconds' => 123,
'from_phone_number_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'max_attempts' => 123,
'max_concurrency' => 123,
'name' => '<string>',
'retry_after_minutes' => 123,
'start_at' => '2023-11-07T05:31:56Z',
'timezone' => '<string>'
]),
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.talqing.com/v1/calls/batches/{batch_id}"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"calling_window\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\",\n \"days\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7\n ]\n },\n \"dial_daily_cap\": {\n \"kind\": \"fixed\",\n \"limit\": 2\n },\n \"dial_gap_seconds\": 123,\n \"from_phone_number_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_attempts\": 123,\n \"max_concurrency\": 123,\n \"name\": \"<string>\",\n \"retry_after_minutes\": 123,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.talqing.com/v1/calls/batches/{batch_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"calling_window\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\",\n \"days\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7\n ]\n },\n \"dial_daily_cap\": {\n \"kind\": \"fixed\",\n \"limit\": 2\n },\n \"dial_gap_seconds\": 123,\n \"from_phone_number_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_attempts\": 123,\n \"max_concurrency\": 123,\n \"name\": \"<string>\",\n \"retry_after_minutes\": 123,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talqing.com/v1/calls/batches/{batch_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"calling_window\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\",\n \"days\": [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7\n ]\n },\n \"dial_daily_cap\": {\n \"kind\": \"fixed\",\n \"limit\": 2\n },\n \"dial_gap_seconds\": 123,\n \"from_phone_number_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_attempts\": 123,\n \"max_concurrency\": 123,\n \"name\": \"<string>\",\n \"retry_after_minutes\": 123,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_name": "<string>",
"calling_window": {
"end": "<string>",
"start": "<string>",
"days": [
1,
2,
3,
4,
5,
6,
7
]
},
"counts": {
"canceled": 123,
"completed": 123,
"dialing": 123,
"failed": 123,
"pending": 123,
"total": 123,
"voicemail": 123
},
"created_at": "2023-11-07T05:31:56Z",
"dial_daily_cap": {
"kind": "fixed",
"limit": 2
},
"dial_daily_cap_today": 123,
"dial_gap_seconds": 123,
"dialed_today": 123,
"ended_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>",
"from_e164": "<string>",
"from_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_attempts": 123,
"max_concurrency": 123,
"name": "<string>",
"next_dial_at": "2023-11-07T05:31:56Z",
"next_dial_reason": "start",
"retry_after_minutes": 123,
"start_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"status": "scheduled",
"timezone": "<string>",
"agent_plan": {
"members": [
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"override": {},
"version": 123
}
]
},
"vars": {}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>",
"code": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Policy edits, allowed while a batch is scheduled, running, paused or completed.
calling_window, start_at and dial_daily_cap accept an explicit
null to clear them — "dial at any hour", "start on the next pass", "no
daily limit" — which is why the
service reads model_fields_set rather than treating absent and null the
same way. Every other field keeps the usual PATCH rule: absent means
unchanged.
The hours a list may run in, on the list's own clock.
Shared rather than duplicated, for the same reason window_state is: a
call batch and an email send run store the same three values under the same
names and must not each get their own copy of the rules. The field that
carries one is named for what it gates — calling_window on a campaign,
window on an email batch and its runs.
A window that crosses midnight (21:00-06:00) is valid and means
exactly what an evening consumer-calling window means: the day check applies
to the start side, so 21:00-06:00 on days: [5] runs Friday
21:00 through Saturday 06:00.
Show child attributes
Show child attributes
The same limit every day.
- FixedDailyCap
- RampDailyCap
Show child attributes
Show child attributes
1 - 200Response
Successful Response
The hours a list may run in, on the list's own clock.
Shared rather than duplicated, for the same reason window_state is: a
call batch and an email send run store the same three values under the same
names and must not each get their own copy of the rules. The field that
carries one is named for what it gates — calling_window on a campaign,
window on an email batch and its runs.
A window that crosses midnight (21:00-06:00) is valid and means
exactly what an evening consumer-calling window means: the day check applies
to the start side, so 21:00-06:00 on days: [5] runs Friday
21:00 through Saturday 06:00.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The same limit every day.
- FixedDailyCap
- RampDailyCap
Show child attributes
Show child attributes
start, window, daily_cap scheduled, running, paused, completed, canceled, failed What a call ran, frozen at the moment it started.
Written only when the call differs from "the published agent, as-is" — so a
null agent_plan means exactly that. members[0] is the agent that
answered.
Show child attributes
Show child attributes
Show child attributes
Show child attributes