Tags
Remove Tag
Remove a tag from a subscriber
POST
/
api
/
v1
/
subscribers
/
tags
/
remove
Remove Tag
curl --request POST \
--url https://api.sequenzy.com/api/v1/subscribers/tags/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"externalId": "<string>",
"tag": "<string>",
"firstName": "<string>",
"lastName": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/v1/subscribers/tags/remove"
payload = {
"email": "<string>",
"externalId": "<string>",
"tag": "<string>",
"firstName": "<string>",
"lastName": "<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({
email: '<string>',
externalId: '<string>',
tag: '<string>',
firstName: '<string>',
lastName: '<string>'
})
};
fetch('https://api.sequenzy.com/api/v1/subscribers/tags/remove', 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/tags/remove",
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([
'email' => '<string>',
'externalId' => '<string>',
'tag' => '<string>',
'firstName' => '<string>',
'lastName' => '<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/tags/remove"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"tag\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\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/tags/remove")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"tag\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/subscribers/tags/remove")
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 \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"tag\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"subscriber": {
"id": "sub_abc123",
"email": "user@example.com",
"externalId": "user_123",
"tags": ["newsletter"],
"created": false
},
"tag": {
"name": "premium",
"removed": true
}
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Internal server error"
}
Remove a tag from a subscriber. If the subscriber doesn’t exist, they will be created (without the tag).
Request Body
string
Subscriber delivery email address. Required when creating a new subscriber.
string
Your app/customer/user ID for this subscriber. You can remove tags with only
externalId when the subscriber already exists.string
required
Tag name to remove
string
First name (used if creating new subscriber)
string
Last name (used if creating new subscriber)
curl -X POST "https://api.sequenzy.com/api/v1/subscribers/tags/remove" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"externalId": "user_123",
"tag": "premium"
}'
Responses
{
"success": true,
"subscriber": {
"id": "sub_abc123",
"email": "user@example.com",
"externalId": "user_123",
"tags": ["newsletter"],
"created": false
},
"tag": {
"name": "premium",
"removed": true
}
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Internal server error"
}
Response Fields
| Field | Description |
|---|---|
subscriber.created | true if subscriber was created by this request |
tag.removed | true if the tag was removed from the subscriber |
Use Cases
Downgrade Customer Status
# When customer cancels subscription
curl -X POST "https://api.sequenzy.com/api/v1/subscribers/tags/remove" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"tag": "premium"
}'
Remove Interest Tag
# When user unsubscribes from a topic
curl -X POST "https://api.sequenzy.com/api/v1/subscribers/tags/remove" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "reader@example.com",
"tag": "interested-ai"
}'
If the subscriber doesn’t have the specified tag, the request will still
succeed with
tag.removed: false.⌘I
Remove Tag
curl --request POST \
--url https://api.sequenzy.com/api/v1/subscribers/tags/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"externalId": "<string>",
"tag": "<string>",
"firstName": "<string>",
"lastName": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/v1/subscribers/tags/remove"
payload = {
"email": "<string>",
"externalId": "<string>",
"tag": "<string>",
"firstName": "<string>",
"lastName": "<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({
email: '<string>',
externalId: '<string>',
tag: '<string>',
firstName: '<string>',
lastName: '<string>'
})
};
fetch('https://api.sequenzy.com/api/v1/subscribers/tags/remove', 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/tags/remove",
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([
'email' => '<string>',
'externalId' => '<string>',
'tag' => '<string>',
'firstName' => '<string>',
'lastName' => '<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/tags/remove"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"tag\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\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/tags/remove")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"tag\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/subscribers/tags/remove")
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 \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"tag\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"subscriber": {
"id": "sub_abc123",
"email": "user@example.com",
"externalId": "user_123",
"tags": ["newsletter"],
"created": false
},
"tag": {
"name": "premium",
"removed": true
}
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Internal server error"
}