Metrics
Dashboard sparkline trends
Daily time-series + period-over-period comparison for messages, conversations, runs, contacts.
GET
/
api
/
metrics
/
overview
/
trends
Dashboard sparkline trends
curl --request GET \
--url https://api.tedro.io/api/metrics/overview/trends \
--header 'x-workspace-id: <api-key>' \
--cookie better-auth.session_token=import requests
url = "https://api.tedro.io/api/metrics/overview/trends"
headers = {
"cookie": "better-auth.session_token=",
"x-workspace-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {cookie: 'better-auth.session_token=', 'x-workspace-id': '<api-key>'}
};
fetch('https://api.tedro.io/api/metrics/overview/trends', 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.tedro.io/api/metrics/overview/trends",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "better-auth.session_token=",
CURLOPT_HTTPHEADER => [
"x-workspace-id: <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://api.tedro.io/api/metrics/overview/trends"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "better-auth.session_token=")
req.Header.Add("x-workspace-id", "<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://api.tedro.io/api/metrics/overview/trends")
.header("cookie", "better-auth.session_token=")
.header("x-workspace-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tedro.io/api/metrics/overview/trends")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'better-auth.session_token='
request["x-workspace-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"range": "<string>",
"trends": {
"messages": [
{
"date": "<string>",
"count": 123
}
],
"conversations": [
{
"date": "<string>",
"count": 123
}
],
"runs": [
{
"date": "<string>",
"count": 123
}
],
"contacts": [
{
"date": "<string>",
"count": 123
}
]
},
"comparison": {
"messages": {
"current": 123,
"previous": 123,
"changePercent": 123
},
"conversations": {
"current": 123,
"previous": 123,
"changePercent": 123
},
"runs": {
"current": 123,
"previous": 123,
"changePercent": 123
},
"contacts": {
"current": 123,
"previous": 123,
"changePercent": 123
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Session cookie set by Better Auth on sign-in.
Workspace UUID. Required on all /api/* endpoints.
Query Parameters
Range window (default 7d)
Available options:
7d, 30d Previous
Time-series analyticsBucketed analytics (message volume, runs, conversations, response times, cost-over-time).
Next
⌘I
Dashboard sparkline trends
curl --request GET \
--url https://api.tedro.io/api/metrics/overview/trends \
--header 'x-workspace-id: <api-key>' \
--cookie better-auth.session_token=import requests
url = "https://api.tedro.io/api/metrics/overview/trends"
headers = {
"cookie": "better-auth.session_token=",
"x-workspace-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {cookie: 'better-auth.session_token=', 'x-workspace-id': '<api-key>'}
};
fetch('https://api.tedro.io/api/metrics/overview/trends', 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.tedro.io/api/metrics/overview/trends",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "better-auth.session_token=",
CURLOPT_HTTPHEADER => [
"x-workspace-id: <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://api.tedro.io/api/metrics/overview/trends"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "better-auth.session_token=")
req.Header.Add("x-workspace-id", "<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://api.tedro.io/api/metrics/overview/trends")
.header("cookie", "better-auth.session_token=")
.header("x-workspace-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tedro.io/api/metrics/overview/trends")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'better-auth.session_token='
request["x-workspace-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"range": "<string>",
"trends": {
"messages": [
{
"date": "<string>",
"count": 123
}
],
"conversations": [
{
"date": "<string>",
"count": 123
}
],
"runs": [
{
"date": "<string>",
"count": 123
}
],
"contacts": [
{
"date": "<string>",
"count": 123
}
]
},
"comparison": {
"messages": {
"current": 123,
"previous": 123,
"changePercent": 123
},
"conversations": {
"current": 123,
"previous": 123,
"changePercent": 123
},
"runs": {
"current": 123,
"previous": 123,
"changePercent": 123
},
"contacts": {
"current": 123,
"previous": 123,
"changePercent": 123
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}