curl --request POST \
--url https://api.talqing.com/v1/calls/batches/{batch_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.talqing.com/v1/calls/batches/{batch_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.talqing.com/v1/calls/batches/{batch_id}/cancel', 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}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.talqing.com/v1/calls/batches/{batch_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.talqing.com/v1/calls/batches/{batch_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talqing.com/v1/calls/batches/{batch_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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>"
}
}Cancel Call Batch
Stop a batch for good. There is no undo.
Everyone not yet called immediately reads as canceled. Calls already
ringing or in progress are not dropped — they run to their natural end,
and the batch is only finished once they have.
curl --request POST \
--url https://api.talqing.com/v1/calls/batches/{batch_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.talqing.com/v1/calls/batches/{batch_id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.talqing.com/v1/calls/batches/{batch_id}/cancel', 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}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.talqing.com/v1/calls/batches/{batch_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.talqing.com/v1/calls/batches/{batch_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talqing.com/v1/calls/batches/{batch_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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
Response
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