Get User Segmentation
curl --request GET \
--url https://ebn.telemetree.io/public-api/users/segmentation \
--header 'x-api-key: <api-key>'import requests
url = "https://ebn.telemetree.io/public-api/users/segmentation"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://ebn.telemetree.io/public-api/users/segmentation', 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://ebn.telemetree.io/public-api/users/segmentation",
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-api-key: <api-key>"
],
]);
$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://ebn.telemetree.io/public-api/users/segmentation"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://ebn.telemetree.io/public-api/users/segmentation")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ebn.telemetree.io/public-api/users/segmentation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"limit": 123,
"offset": 123,
"data": [
{
"telegram_id": 123,
"first_active_at": "2023-11-07T05:31:56Z",
"total_events": 123,
"total_sessions": 123,
"last_active_at": "2023-11-07T05:31:56Z",
"language": "<string>",
"utm": "<string>",
"is_premium": false,
"country": "<string>",
"city": "<string>",
"username": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"device": "<string>",
"brand": "<string>",
"model": "<string>"
}
],
"status_code": 200,
"message": "Success"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}User API
Get User Segmentation
Description: Retrieves user information based on the specified filters.
Parameters:
language: The language. Use country code (ex: ‘en’, ‘ru’, ‘es’, etc.)utm: The start parameteris_premium: Whether the user is premiumcountry: The countrycity: The city
Header
x-api-key: Your API Key (Dashboard->Settings)
Returns:
UserSegmentationResponse: The response containing the user segmentation data. It contains the following fields:data: The list of user segmentation entries. It contains the following fields:telegram_id: The Telegram ID of the user.language: The language of the user. Defaults to None.utm: The start parameter of the user. Defaults to None.is_premium: Whether the user is premium. Defaults to False.first_active_at: The first active date of the user.country: The country of the user. Defaults to None.city: The city of the user. Defaults to None.total_events: The total number of events from the user in your application.total_sessions: The total number of sessions from the user in your application.username: The username of the user. Defaults to None.firstname: The first name of the user. Defaults to None.lastname: The last name of the user. Defaults to None.last_active_at: The last active date of the user.device: The device of the user. Defaults to None.brand: The brand of the user. Defaults to None.model: The model of the user. Defaults to None.
limit: The number of items per page.offset: The number of items to skip.status_code: The status code of the response.message: The message of the response.
Raises:
HTTPException: If an error occurs during the retrieval process.
GET
/
users
/
segmentation
Get User Segmentation
curl --request GET \
--url https://ebn.telemetree.io/public-api/users/segmentation \
--header 'x-api-key: <api-key>'import requests
url = "https://ebn.telemetree.io/public-api/users/segmentation"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://ebn.telemetree.io/public-api/users/segmentation', 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://ebn.telemetree.io/public-api/users/segmentation",
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-api-key: <api-key>"
],
]);
$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://ebn.telemetree.io/public-api/users/segmentation"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://ebn.telemetree.io/public-api/users/segmentation")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ebn.telemetree.io/public-api/users/segmentation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"limit": 123,
"offset": 123,
"data": [
{
"telegram_id": 123,
"first_active_at": "2023-11-07T05:31:56Z",
"total_events": 123,
"total_sessions": 123,
"last_active_at": "2023-11-07T05:31:56Z",
"language": "<string>",
"utm": "<string>",
"is_premium": false,
"country": "<string>",
"city": "<string>",
"username": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"device": "<string>",
"brand": "<string>",
"model": "<string>"
}
],
"status_code": 200,
"message": "Success"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Your API Key (Dashboard->Settings)
Query Parameters
Language
Start parameter
Is premium user
Country
City
Sort by
Available options:
is_premium, curr_balance, curr_volume, total_events, total_sessions, language, country, city, provider Sort order
Available options:
asc, desc Number of items per page
Required range:
x >= 1Number of items to skip
Required range:
x >= 0