Subscribers
Preview Matching Sequences
Preview which active sequences would start when adding a new contact with the given lists and tags
POST
/
api
/
v1
/
subscribers
/
sequences-preview
Preview Matching Sequences
curl --request POST \
--url https://api.sequenzy.com/api/v1/subscribers/sequences-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"listIds": [
"<string>"
],
"lists": [
"<string>"
],
"tags": [
"<string>"
]
}
'import requests
url = "https://api.sequenzy.com/api/v1/subscribers/sequences-preview"
payload = {
"listIds": ["<string>"],
"lists": ["<string>"],
"tags": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({listIds: ['<string>'], lists: ['<string>'], tags: ['<string>']})
};
fetch('https://api.sequenzy.com/api/v1/subscribers/sequences-preview', 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/subscribers/sequences-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'listIds' => [
'<string>'
],
'lists' => [
'<string>'
],
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/subscribers/sequences-preview"
payload := strings.NewReader("{\n \"listIds\": [\n \"<string>\"\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/subscribers/sequences-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"listIds\": [\n \"<string>\"\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/subscribers/sequences-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"listIds\": [\n \"<string>\"\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"sequences": [
{
"id": "seq_welcome",
"name": "Welcome",
"trigger": {
"type": "contact_added",
"listId": "list_abc123",
"listName": "Newsletter"
}
},
{
"id": "seq_beta",
"name": "Beta Follow-up",
"trigger": {
"type": "tag_added",
"tagName": "beta"
}
}
]
}
{
"success": false,
"error": "One or more listIds do not belong to this company."
}
{
"success": false,
"error": "API key is missing required scope: sequences:read"
}
Use this read-only endpoint before calling Create Subscriber or Create Subscriber Import to see which active sequences match a combination of lists and tags. You can pass any returned sequence IDs in
enrollSequenceIds to enroll contacts into only the sequences you choose.
Requires an API key with the sequences:read scope. Nothing is created or modified.
Request Body
List IDs to evaluate (up to 500 non-empty IDs). Omit
listIds to evaluate
your workspace default lists, or pass [] to evaluate adding a contact with
no lists. Every supplied ID must belong to your workspace. Do not send
together with lists.Alias for
listIds (up to 500 non-empty IDs), matching
POST /api/v1/subscribers. Do not send together with listIds.curl -X POST "https://api.sequenzy.com/api/v1/subscribers/sequences-preview" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"listIds": ["list_abc123"],
"tags": ["beta"]
}'
Responses
{
"success": true,
"sequences": [
{
"id": "seq_welcome",
"name": "Welcome",
"trigger": {
"type": "contact_added",
"listId": "list_abc123",
"listName": "Newsletter"
}
},
{
"id": "seq_beta",
"name": "Beta Follow-up",
"trigger": {
"type": "tag_added",
"tagName": "beta"
}
}
]
}
{
"success": false,
"error": "One or more listIds do not belong to this company."
}
{
"success": false,
"error": "API key is missing required scope: sequences:read"
}
Trigger Shapes
Each item insequences includes the trigger that matched:
trigger.type | Fields | Meaning |
|---|---|---|
contact_added | listId, listName | Triggered by adding a contact to that list (null for any list). |
tag_added | tagName | Triggered by one of your supplied tags or a sync-rule tag. |
contact_subscribed | none | Triggered by the contact.subscribed event without email-based filters. |
⌘I
Preview Matching Sequences
curl --request POST \
--url https://api.sequenzy.com/api/v1/subscribers/sequences-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"listIds": [
"<string>"
],
"lists": [
"<string>"
],
"tags": [
"<string>"
]
}
'import requests
url = "https://api.sequenzy.com/api/v1/subscribers/sequences-preview"
payload = {
"listIds": ["<string>"],
"lists": ["<string>"],
"tags": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({listIds: ['<string>'], lists: ['<string>'], tags: ['<string>']})
};
fetch('https://api.sequenzy.com/api/v1/subscribers/sequences-preview', 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/subscribers/sequences-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'listIds' => [
'<string>'
],
'lists' => [
'<string>'
],
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/subscribers/sequences-preview"
payload := strings.NewReader("{\n \"listIds\": [\n \"<string>\"\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/subscribers/sequences-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"listIds\": [\n \"<string>\"\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/subscribers/sequences-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"listIds\": [\n \"<string>\"\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"sequences": [
{
"id": "seq_welcome",
"name": "Welcome",
"trigger": {
"type": "contact_added",
"listId": "list_abc123",
"listName": "Newsletter"
}
},
{
"id": "seq_beta",
"name": "Beta Follow-up",
"trigger": {
"type": "tag_added",
"tagName": "beta"
}
}
]
}
{
"success": false,
"error": "One or more listIds do not belong to this company."
}
{
"success": false,
"error": "API key is missing required scope: sequences:read"
}