curl --request POST \
--url https://api.talqing.com/v1/whatsapp/batches/{batch_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.talqing.com/v1/whatsapp/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/whatsapp/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/whatsapp/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/whatsapp/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/whatsapp/batches/{batch_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talqing.com/v1/whatsapp/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>",
"agent_plan": {
"members": [
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"override": {},
"version": 123
}
]
},
"counts": {
"delivered": 123,
"failed": 123,
"queued": 123,
"read": 123,
"ready": 123,
"replied": 123,
"sending": 123,
"sent": 123,
"skipped": 123,
"total": 123,
"undelivered": 123
},
"created_at": "2023-11-07T05:31:56Z",
"delivery_attempts": 123,
"delivery_retry_after_hours": 123,
"failure_reason": "<string>",
"finished_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input_columns": [
"<string>"
],
"integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integration_name": "<string>",
"name": "<string>",
"next_send_at": "2023-11-07T05:31:56Z",
"next_send_reason": "start",
"own_agent": true,
"send_daily_cap": {
"kind": "fixed",
"limit": 2
},
"send_daily_cap_today": 123,
"send_gap_seconds": 123,
"sender_e164": "<string>",
"sent_today": 123,
"start_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"status": "draft",
"template": {
"body": "<string>",
"buttons": [
{
"code": "<string>",
"phone_number": "<string>",
"text": "<string>",
"ttl_minutes": 123,
"type": "url",
"url": "<string>"
}
],
"category": "marketing",
"footer": "<string>",
"header": {
"text": "<string>",
"type": "text",
"url": "<string>"
},
"id": "<string>",
"language": "<string>",
"name": "<string>",
"variables": [
"<string>"
]
},
"timezone": "<string>",
"to_column": "<string>",
"variable_map": {},
"vars": {},
"window": {
"end": "<string>",
"start": "<string>",
"days": [
1,
2,
3,
4,
5,
6,
7
]
}
}{
"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 Whatsapp Batch
Stop for good. Messages already sent stay sent, and replies are still answered.
curl --request POST \
--url https://api.talqing.com/v1/whatsapp/batches/{batch_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.talqing.com/v1/whatsapp/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/whatsapp/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/whatsapp/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/whatsapp/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/whatsapp/batches/{batch_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.talqing.com/v1/whatsapp/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>",
"agent_plan": {
"members": [
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"override": {},
"version": 123
}
]
},
"counts": {
"delivered": 123,
"failed": 123,
"queued": 123,
"read": 123,
"ready": 123,
"replied": 123,
"sending": 123,
"sent": 123,
"skipped": 123,
"total": 123,
"undelivered": 123
},
"created_at": "2023-11-07T05:31:56Z",
"delivery_attempts": 123,
"delivery_retry_after_hours": 123,
"failure_reason": "<string>",
"finished_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input_columns": [
"<string>"
],
"integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integration_name": "<string>",
"name": "<string>",
"next_send_at": "2023-11-07T05:31:56Z",
"next_send_reason": "start",
"own_agent": true,
"send_daily_cap": {
"kind": "fixed",
"limit": 2
},
"send_daily_cap_today": 123,
"send_gap_seconds": 123,
"sender_e164": "<string>",
"sent_today": 123,
"start_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"status": "draft",
"template": {
"body": "<string>",
"buttons": [
{
"code": "<string>",
"phone_number": "<string>",
"text": "<string>",
"ttl_minutes": 123,
"type": "url",
"url": "<string>"
}
],
"category": "marketing",
"footer": "<string>",
"header": {
"text": "<string>",
"type": "text",
"url": "<string>"
},
"id": "<string>",
"language": "<string>",
"name": "<string>",
"variables": [
"<string>"
]
},
"timezone": "<string>",
"to_column": "<string>",
"variable_map": {},
"vars": {},
"window": {
"end": "<string>",
"start": "<string>",
"days": [
1,
2,
3,
4,
5,
6,
7
]
}
}{
"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
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
start, window, daily_cap, retry, gap The same limit every day.
- FixedDailyCap
- RampDailyCap
Show child attributes
Show child attributes
draft, scheduled, sending, paused, completed, canceled, failed The whole message as a batch sends it: header, body, footer and buttons.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
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