Daily stats
curl --request GET \
--url https://api.naturalead.ai/api/analytics/daily \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.naturalead.ai/api/analytics/daily"
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://api.naturalead.ai/api/analytics/daily', 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.naturalead.ai/api/analytics/daily",
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://api.naturalead.ai/api/analytics/daily"
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://api.naturalead.ai/api/analytics/daily")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.naturalead.ai/api/analytics/daily")
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[
{
"date": "2023-12-25",
"conversations": 123,
"replied": 123,
"handed_off": 123,
"qualified": 123,
"disqualified": 123
}
]{
"error": "Failed to process request"
}Analytics
Daily Stats
Returns daily breakdowns of key metrics over the specified time range,
suitable for charting and trend analysis.
Requires analytics:view permission.
GET
/
api
/
analytics
/
daily
Daily stats
curl --request GET \
--url https://api.naturalead.ai/api/analytics/daily \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.naturalead.ai/api/analytics/daily"
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://api.naturalead.ai/api/analytics/daily', 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.naturalead.ai/api/analytics/daily",
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://api.naturalead.ai/api/analytics/daily"
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://api.naturalead.ai/api/analytics/daily")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.naturalead.ai/api/analytics/daily")
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[
{
"date": "2023-12-25",
"conversations": 123,
"replied": 123,
"handed_off": 123,
"qualified": 123,
"disqualified": 123
}
]{
"error": "Failed to process request"
}Authorizations
ApiKeyAuthBearerAuth
API key for programmatic access. Keys use the format nl_live_<64 hex>
or nl_test_<64 hex> and are scoped to an account's RBAC permissions.
Query Parameters
Time range for analytics data
Available options:
7d, 30d, 90d Response
Daily stats array
The date for this data point (YYYY-MM-DD)
Conversations started on this day
Conversations where the lead sent at least one message
Conversations with status handed_off on this day
Deprecated. Conversations with historical
qualificationResult.qualified === true
Deprecated. Prefer session status / stage distribution.