Skip to main content
GET
/
v4
/
account
/
growth_stats
Get growth stats
curl --request GET \
  --url https://api.kit.com/v4/account/growth_stats \
  --header 'X-Kit-Api-Key: <api-key>'
require 'uri'
require 'net/http'

url = URI("https://api.kit.com/v4/account/growth_stats")

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_body
const options = {method: 'GET', headers: {'X-Kit-Api-Key': '<api-key>'}};

fetch('https://api.kit.com/v4/account/growth_stats', 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/account/growth_stats"

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/account/growth_stats",
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/account/growth_stats"

headers = {"X-Kit-Api-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
{
  "stats": {
    "cancellations": 0,
    "net_new_subscribers": 3,
    "new_subscribers": 3,
    "subscribers": 3,
    "starting": "2023-02-10T00:00:00-05:00",
    "ending": "2023-02-24T23:59:59-05:00"
  }
}
{
"errors": [
"The access token is invalid"
]
}
{
"errors": [
"Starting date is incorrectly formatted. Use YYYY-MM-DD.",
"Ending date is incorrectly formatted. Use YYYY-MM-DD.",
"Starting date must be before the ending date."
]
}

Authorizations

X-Kit-Api-Key
string
header
required

Authenticate API requests via an API Key

Query Parameters

ending
string

Get stats for time period ending on this date (format yyyy-mm-dd). Defaults to today.

starting
string

Get stats for time period beginning on this date (format yyyy-mm-dd). Defaults to 90 days ago.

Response

Returns your growth stats for the provided starting and ending dates

stats
object
required