Get a subscriber
curl --request GET \
--url https://api.kit.com/v4/subscribers/{id} \
--header 'X-Kit-Api-Key: <api-key>'require 'uri'
require 'net/http'
url = URI("https://api.kit.com/v4/subscribers/{id}")
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/subscribers/{id}', 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/subscribers/{id}"
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/subscribers/{id}",
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/subscribers/{id}"
headers = {"X-Kit-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"subscriber": {
"id": 339,
"first_name": "Alice",
"email_address": "alice@convertkit.dev",
"state": "active",
"created_at": "2023-02-17T11:43:55Z",
"fields": {
"category": "One"
},
"canceled_at": null,
"location": {
"city": "Williamstown",
"state": "Massachusetts",
"country": "US",
"latitude": 9.99,
"longitude": 9.99,
"timezone": "US/EST"
}
}
}{
"errors": [
"The access token is invalid"
]
}{
"errors": [
"Not Found"
]
}Subscribers
Get a subscriber
Returns a single subscriber’s record: first name, email address, state (e.g. active or cancelled), creation date, and their custom field values under fields.
To look a subscriber up by email address instead of id, use List subscribers with the email_address parameter. For their email engagement history, see List stats for a subscriber; for their tags, see List tags for a subscriber.
GET
/
v4
/
subscribers
/
{id}
Get a subscriber
curl --request GET \
--url https://api.kit.com/v4/subscribers/{id} \
--header 'X-Kit-Api-Key: <api-key>'require 'uri'
require 'net/http'
url = URI("https://api.kit.com/v4/subscribers/{id}")
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/subscribers/{id}', 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/subscribers/{id}"
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/subscribers/{id}",
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/subscribers/{id}"
headers = {"X-Kit-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"subscriber": {
"id": 339,
"first_name": "Alice",
"email_address": "alice@convertkit.dev",
"state": "active",
"created_at": "2023-02-17T11:43:55Z",
"fields": {
"category": "One"
},
"canceled_at": null,
"location": {
"city": "Williamstown",
"state": "Massachusetts",
"country": "US",
"latitude": 9.99,
"longitude": 9.99,
"timezone": "US/EST"
}
}
}{
"errors": [
"The access token is invalid"
]
}{
"errors": [
"Not Found"
]
}Was this page helpful?
⌘I