Insights
Get customer metrics over time
Returns a time series of customer lifecycle events: new, reactivated, existing, and churned customer counts per period.
GET
/
insights
/
customers
/
over-time
Get customer metrics over time
curl --request GET \
--url https://api.alguna.io/insights/customers/over-time \
--header 'Alguna-Version: <alguna-version>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alguna.io/insights/customers/over-time"
headers = {
"Alguna-Version": "<alguna-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Alguna-Version': '<alguna-version>', Authorization: 'Bearer <token>'}
};
fetch('https://api.alguna.io/insights/customers/over-time', 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.alguna.io/insights/customers/over-time",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Alguna-Version: <alguna-version>",
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.alguna.io/insights/customers/over-time"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Alguna-Version", "<alguna-version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.alguna.io/insights/customers/over-time")
.header("Alguna-Version", "<alguna-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alguna.io/insights/customers/over-time")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Alguna-Version"] = '<alguna-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"points": [
{
"churned_customer_count": 3,
"end_date": "2026-02-01T00:00:00Z",
"existing_customer_count": 140,
"new_customer_count": 8,
"reactivated_customer_count": 2,
"start_date": "2026-01-01T00:00:00Z"
}
],
"resolution": "months"
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
Available options:
2026-04-01 Query Parameters
Time period for the query. Determines the primary period and automatically calculates a comparison period.
Available options:
this_month, last_month, two_months_ago, this_quarter, last_quarter, two_quarters_ago, this_year, last_year, last_twelve_months, all_time Example:
"this_month"
⌘I
Get customer metrics over time
curl --request GET \
--url https://api.alguna.io/insights/customers/over-time \
--header 'Alguna-Version: <alguna-version>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alguna.io/insights/customers/over-time"
headers = {
"Alguna-Version": "<alguna-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Alguna-Version': '<alguna-version>', Authorization: 'Bearer <token>'}
};
fetch('https://api.alguna.io/insights/customers/over-time', 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.alguna.io/insights/customers/over-time",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Alguna-Version: <alguna-version>",
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.alguna.io/insights/customers/over-time"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Alguna-Version", "<alguna-version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.alguna.io/insights/customers/over-time")
.header("Alguna-Version", "<alguna-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alguna.io/insights/customers/over-time")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Alguna-Version"] = '<alguna-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"points": [
{
"churned_customer_count": 3,
"end_date": "2026-02-01T00:00:00Z",
"existing_customer_count": 140,
"new_customer_count": 8,
"reactivated_customer_count": 2,
"start_date": "2026-01-01T00:00:00Z"
}
],
"resolution": "months"
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}