Skip to main content
GET
/
customers
/
metrics
Get aggregated customer metrics
curl --request GET \
  --url https://api.qonversion.io/v4/customers/metrics \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.qonversion.io/v4/customers/metrics"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.qonversion.io/v4/customers/metrics', 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.qonversion.io/v4/customers/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
require 'uri'
require 'net/http'

url = URI("https://api.qonversion.io/v4/customers/metrics")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.qonversion.io/v4/customers/metrics"

req, _ := http.NewRequest("GET", url, nil)

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.qonversion.io/v4/customers/metrics")
.header("Authorization", "Bearer <token>")
.asString();
{
  "object": "customer_metrics",
  "url": "/v4/customers/metrics",
  "active_subscribers": "1284",
  "active_trials": "312",
  "avg_payment_count": 2.4,
  "avg_price": 14.99,
  "billing_retry": "18",
  "canceled_trials": 57,
  "churned_subscribers": 94,
  "clients_with_event": "9420",
  "sales": 4612
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}

Authorizations

Authorization
string
header
required

Bearer authentication using the project Secret Key (prefixed with sk_, or test_sk_ for sandbox). All v4 public endpoints require the Secret Key — see Authentication. Never expose the Secret Key in client-side code.

Query Parameters

environment
enum<integer>

Filter by environment: 0 = sandbox, 1 = production.

Available options:
0,
1

Search query string.

filter[status][]
string[]

Filter by customer status. Repeatable.

filter[target_platform][]
string[]

Filter by target platform. Repeatable.

Response

Customer metrics data.

Aggregated customer metrics wrapped in the v4 envelope (object, url). Scalar counters reflect the current filter set (environment, status, platform, search).