curl --request POST \
--url https://api.ciarem.ai/v1/broadcasts/{broadcast_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ciarem.ai/v1/broadcasts/{broadcast_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.ciarem.ai/v1/broadcasts/{broadcast_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.ciarem.ai/v1/broadcasts/{broadcast_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.ciarem.ai/v1/broadcasts/{broadcast_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.ciarem.ai/v1/broadcasts/{broadcast_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ciarem.ai/v1/broadcasts/{broadcast_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{
"id": "<string>",
"template_id": "<string>",
"template_name": "<string>",
"template_language": "<string>",
"channel_id": "<string>",
"status": "in_progress",
"requested": 123,
"sent": 123,
"failed": 123,
"pending": 123,
"origin": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>"
}Cancel a broadcast
Abandon the un-sent remainder.
The worker checks for a cancel once per chunk, so every chunk that has not started is dropped. Messages already handed to Meta still complete — a message Meta accepted cannot be unsent. Idempotent: cancelling an already terminal broadcast returns it unchanged rather than erroring.
curl --request POST \
--url https://api.ciarem.ai/v1/broadcasts/{broadcast_id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ciarem.ai/v1/broadcasts/{broadcast_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.ciarem.ai/v1/broadcasts/{broadcast_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.ciarem.ai/v1/broadcasts/{broadcast_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.ciarem.ai/v1/broadcasts/{broadcast_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.ciarem.ai/v1/broadcasts/{broadcast_id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ciarem.ai/v1/broadcasts/{broadcast_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{
"id": "<string>",
"template_id": "<string>",
"template_name": "<string>",
"template_language": "<string>",
"channel_id": "<string>",
"status": "in_progress",
"requested": 123,
"sent": 123,
"failed": 123,
"pending": 123,
"origin": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>"
}Authorizations
An org API key: Authorization: Bearer oak_….
Path Parameters
Response
Successful Response
A queued template send. Counts are derived from the messages it produced,
so they move as the worker fans the batch out; they always sum to
requested.
Derived campaign status shown in the UI. stopped_low_balance and
cancelled mirror the stored state; the other two are computed from the
counts (no stored value — chunked async means no single worker knows it sent
the last recipient).
in_progress, completed, stopped_low_balance, cancelled