List subscribers for a tag
curl --request GET \
--url https://api.kit.com/v4/tags/{tag_id}/subscribers \
--header 'X-Kit-Api-Key: <api-key>'require 'uri'
require 'net/http'
url = URI("https://api.kit.com/v4/tags/{tag_id}/subscribers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Kit-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyconst options = {method: 'GET', headers: {'X-Kit-Api-Key': '<api-key>'}};
fetch('https://api.kit.com/v4/tags/{tag_id}/subscribers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kit.com/v4/tags/{tag_id}/subscribers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Kit-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kit.com/v4/tags/{tag_id}/subscribers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Kit-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.kit.com/v4/tags/{tag_id}/subscribers"
headers = {"X-Kit-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"subscribers": [
{
"id": 1140,
"first_name": null,
"email_address": "subscriber634@kit.dev",
"state": "active",
"created_at": "2023-02-17T11:43:55Z",
"tagged_at": "2023-02-17T11:43:55Z",
"fields": {
"category": "One"
}
},
{
"id": 1139,
"first_name": null,
"email_address": "subscriber633@kit.dev",
"state": "active",
"created_at": "2023-02-17T11:43:55Z",
"tagged_at": "2023-02-17T11:43:55Z",
"fields": {
"category": null
}
},
{
"id": 1138,
"first_name": null,
"email_address": "subscriber632@kit.dev",
"state": "active",
"created_at": "2023-02-17T11:43:55Z",
"tagged_at": "2023-02-17T11:43:55Z",
"fields": {
"category": null
}
}
],
"pagination": {
"has_previous_page": false,
"has_next_page": false,
"start_cursor": "WyIyMDIzLTAyLTE3VDExOjQzOjU1LjAwMFoiLDE3XQ==",
"end_cursor": "WyIyMDIzLTAyLTE3VDExOjQzOjU1LjAwMFoiLDE1XQ==",
"per_page": 500
}
}{
"errors": [
"The access token is invalid"
]
}{
"errors": [
"Not Found"
]
}Tags
List subscribers for a tag
Returns a cursor-paginated list of subscribers who have this tag. By default only active subscribers are returned — use status (active, inactive, bounced, complained, cancelled, or all) to widen the search.
Filter by when the tag was applied with tagged_after/tagged_before (format yyyy-mm-dd), or by when the subscriber joined with created_after/created_before. Set slim=true to omit expensive optional fields for a faster, smaller response.
GET
/
v4
/
tags
/
{tag_id}
/
subscribers
List subscribers for a tag
curl --request GET \
--url https://api.kit.com/v4/tags/{tag_id}/subscribers \
--header 'X-Kit-Api-Key: <api-key>'require 'uri'
require 'net/http'
url = URI("https://api.kit.com/v4/tags/{tag_id}/subscribers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Kit-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyconst options = {method: 'GET', headers: {'X-Kit-Api-Key': '<api-key>'}};
fetch('https://api.kit.com/v4/tags/{tag_id}/subscribers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kit.com/v4/tags/{tag_id}/subscribers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Kit-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kit.com/v4/tags/{tag_id}/subscribers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Kit-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.kit.com/v4/tags/{tag_id}/subscribers"
headers = {"X-Kit-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"subscribers": [
{
"id": 1140,
"first_name": null,
"email_address": "subscriber634@kit.dev",
"state": "active",
"created_at": "2023-02-17T11:43:55Z",
"tagged_at": "2023-02-17T11:43:55Z",
"fields": {
"category": "One"
}
},
{
"id": 1139,
"first_name": null,
"email_address": "subscriber633@kit.dev",
"state": "active",
"created_at": "2023-02-17T11:43:55Z",
"tagged_at": "2023-02-17T11:43:55Z",
"fields": {
"category": null
}
},
{
"id": 1138,
"first_name": null,
"email_address": "subscriber632@kit.dev",
"state": "active",
"created_at": "2023-02-17T11:43:55Z",
"tagged_at": "2023-02-17T11:43:55Z",
"fields": {
"category": null
}
}
],
"pagination": {
"has_previous_page": false,
"has_next_page": false,
"start_cursor": "WyIyMDIzLTAyLTE3VDExOjQzOjU1LjAwMFoiLDE3XQ==",
"end_cursor": "WyIyMDIzLTAyLTE3VDExOjQzOjU1LjAwMFoiLDE1XQ==",
"per_page": 500
}
}{
"errors": [
"The access token is invalid"
]
}{
"errors": [
"Not Found"
]
}Authorizations
API KeyOAuth2
Query Parameters
Was this page helpful?