curl --request POST \
--url https://brew.new/api/v1/automations/audience-runs/{audienceRunId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://brew.new/api/v1/automations/audience-runs/{audienceRunId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://brew.new/api/v1/automations/audience-runs/{audienceRunId}/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://brew.new/api/v1/automations/audience-runs/{audienceRunId}/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://brew.new/api/v1/automations/audience-runs/{audienceRunId}/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://brew.new/api/v1/automations/audience-runs/{audienceRunId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brew.new/api/v1/automations/audience-runs/{audienceRunId}/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{
"audienceRunId": "arun_7acthhe99pq4448xh83gn54x8eennb",
"status": "canceled"
}Cancel a manual-audience run
Stops a manual-audience launch for good. Emails already sent are NOT recalled and a canceled run cannot be resumed.
Use when a launch must not deliver its remaining steps.
Input audienceRunId in the path; no body.
Returns 200 with the run’s new status (canceled).
Errors 409 RUN_NOT_CANCELLABLE when the run already finished; 503 RUN_STOP_FAILED when the workflow could not be stopped (retry); 404 AUDIENCE_RUN_NOT_FOUND for an unknown or cross-brand id.
See also pauseAudienceRun, resumeAudienceRun, cancelAutomationRun (one event or test run).
curl --request POST \
--url https://brew.new/api/v1/automations/audience-runs/{audienceRunId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://brew.new/api/v1/automations/audience-runs/{audienceRunId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://brew.new/api/v1/automations/audience-runs/{audienceRunId}/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://brew.new/api/v1/automations/audience-runs/{audienceRunId}/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://brew.new/api/v1/automations/audience-runs/{audienceRunId}/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://brew.new/api/v1/automations/audience-runs/{audienceRunId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brew.new/api/v1/automations/audience-runs/{audienceRunId}/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{
"audienceRunId": "arun_7acthhe99pq4448xh83gn54x8eennb",
"status": "canceled"
}Authorizations
Send your Brew API key as Authorization: Bearer brew_xxx.
Headers
The brand this request acts on. REQUIRED for organization-scoped credentials (otherwise 400 BRAND_ID_REQUIRED — there is no default brand); list ids with GET /v1/brands. Brand-scoped credentials may omit it, and sending a different brand returns 403 BRAND_SCOPE_MISMATCH. A brand outside your organization returns 404 BRAND_NOT_FOUND.
1 - 64Path Parameters
The audience run id (from POST /v1/automations/{automationId}/run or GET /v1/automations/audience-runs).
1 - 64"arun_7acthhe99pq4448xh83gn54x8eennb"
Was this page helpful?