curl --request DELETE \
--url https://api.getdialed.ai/v1/flows/batches/{batch_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getdialed.ai/v1/flows/batches/{batch_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.getdialed.ai/v1/flows/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.getdialed.ai/v1/flows/batches/{batch_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.getdialed.ai/v1/flows/batches/{batch_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.getdialed.ai/v1/flows/batches/{batch_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getdialed.ai/v1/flows/batches/{batch_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"detail": "Authentication required"
}{
"detail": "Admin role required"
}{
"detail": "Batch not found"
}{
"detail": "Cannot cancel a batch that has already finished — a terminal batch has nothing left to stop."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "Rate limit exceeded: 100 per 1 minute"
}Cancel a batch (deprecated)
Deprecated — use POST /batches/{batch_id}/cancel instead. This verb performs exactly the same cancellation and is kept only for existing integrations; it additionally requires an admin role, which the POST verb does not.
Stop a batch. Any batch that has not already finished can be cancelled — including one that is actively running.
What happens: further sends stop before this call returns — nothing still waiting in the queue is handed to the provider after that point — the batch’s workflow is cancelled, and the batch’s status becomes cancelled. Every record that had not yet been sent is then settled as unprocessed so nothing is left in limbo. On a large batch that settling lands a few seconds after the response rather than inside it: a million-row batch is millions of record updates, and holding the request open for them would time out at the load balancer. Read the counters a moment later.
What does NOT happen: records already handed to the provider are not recalled. Their outcomes are still collected and written back, so the batch’s final counts tell you exactly what reached the provider before the cancel — cancel stops all future sends, it does not rewrite the past.
Cancelling is a normal part of running a batch and needs no special role: any key for the owning organization can cancel that organization’s own batches. A batch that has already completed, failed or been cancelled returns 409. Cross-tenant access returns 404, never 403.
curl --request DELETE \
--url https://api.getdialed.ai/v1/flows/batches/{batch_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getdialed.ai/v1/flows/batches/{batch_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.getdialed.ai/v1/flows/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.getdialed.ai/v1/flows/batches/{batch_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.getdialed.ai/v1/flows/batches/{batch_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.getdialed.ai/v1/flows/batches/{batch_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getdialed.ai/v1/flows/batches/{batch_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"detail": "Authentication required"
}{
"detail": "Admin role required"
}{
"detail": "Batch not found"
}{
"detail": "Cannot cancel a batch that has already finished — a terminal batch has nothing left to stop."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "Rate limit exceeded: 100 per 1 minute"
}