Sequences
Cancel Audience Enrollment
Stop a queued or running audience enrollment
POST
/
api
/
v1
/
sequences
/
{sequenceId}
/
audience-enrollments
/
{runId}
/
cancel
Cancel Audience Enrollment
curl --request POST \
--url https://api.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/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.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/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.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/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.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/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.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/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{
"success": true,
"audienceEnrollment": {
"id": "aer_abc123",
"sequenceId": "seq_abc123",
"status": "cancelled",
"audience": { "type": "all" },
"targetNodeId": "node_delay_1",
"estimatedCount": 12000,
"processedCount": 0,
"enrolledCount": 0,
"skippedCount": 0,
"source": "api",
"error": null,
"createdAt": "2026-11-01T10:00:00.000Z",
"startedAt": null,
"completedAt": "2026-11-01T10:00:20.000Z",
"cancelRequestedAt": "2026-11-01T10:00:20.000Z"
},
"message": "Audience enrollment cancelled."
}
{
"error": "This enrollment is already completed"
}
{
"error": "Invalid API key"
}
{
"error": "Audience enrollment not found"
}
Stop an audience enrollment run started with Enroll Audience. A queued run is cancelled immediately. A running run stops after the batch it is currently enrolling, so
status stays running with cancelRequestedAt set until the worker observes the request.
Contacts already enrolled stay in the sequence. Use Cancel Enrollments to remove them.
Request
string
required
Sequence ID.
string
required
Audience enrollment run ID.
curl -X POST "https://api.sequenzy.com/api/v1/sequences/seq_abc123/audience-enrollments/aer_abc123/cancel" \
-H "Authorization: Bearer YOUR_API_KEY"
Responses
{
"success": true,
"audienceEnrollment": {
"id": "aer_abc123",
"sequenceId": "seq_abc123",
"status": "cancelled",
"audience": { "type": "all" },
"targetNodeId": "node_delay_1",
"estimatedCount": 12000,
"processedCount": 0,
"enrolledCount": 0,
"skippedCount": 0,
"source": "api",
"error": null,
"createdAt": "2026-11-01T10:00:00.000Z",
"startedAt": null,
"completedAt": "2026-11-01T10:00:20.000Z",
"cancelRequestedAt": "2026-11-01T10:00:20.000Z"
},
"message": "Audience enrollment cancelled."
}
{
"error": "This enrollment is already completed"
}
{
"error": "Invalid API key"
}
{
"error": "Audience enrollment not found"
}
⌘I
Cancel Audience Enrollment
curl --request POST \
--url https://api.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/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.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/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.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/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.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/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.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/sequences/{sequenceId}/audience-enrollments/{runId}/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{
"success": true,
"audienceEnrollment": {
"id": "aer_abc123",
"sequenceId": "seq_abc123",
"status": "cancelled",
"audience": { "type": "all" },
"targetNodeId": "node_delay_1",
"estimatedCount": 12000,
"processedCount": 0,
"enrolledCount": 0,
"skippedCount": 0,
"source": "api",
"error": null,
"createdAt": "2026-11-01T10:00:00.000Z",
"startedAt": null,
"completedAt": "2026-11-01T10:00:20.000Z",
"cancelRequestedAt": "2026-11-01T10:00:20.000Z"
},
"message": "Audience enrollment cancelled."
}
{
"error": "This enrollment is already completed"
}
{
"error": "Invalid API key"
}
{
"error": "Audience enrollment not found"
}