Get Stats
curl --request POST \
--url https://octanist.com/api/stats \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"period": "current",
"startDate": "2026-01-01",
"endDate": "2026-03-01"
}
'import requests
url = "https://octanist.com/api/stats"
payload = {
"period": "current",
"startDate": "2026-01-01",
"endDate": "2026-03-01"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({period: 'current', startDate: '2026-01-01', endDate: '2026-03-01'})
};
fetch('https://octanist.com/api/stats', 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://octanist.com/api/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'period' => 'current',
'startDate' => '2026-01-01',
'endDate' => '2026-03-01'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://octanist.com/api/stats"
payload := strings.NewReader("{\n \"period\": \"current\",\n \"startDate\": \"2026-01-01\",\n \"endDate\": \"2026-03-01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://octanist.com/api/stats")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"period\": \"current\",\n \"startDate\": \"2026-01-01\",\n \"endDate\": \"2026-03-01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octanist.com/api/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"period\": \"current\",\n \"startDate\": \"2026-01-01\",\n \"endDate\": \"2026-03-01\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"usage": {
"leadsUsed": 150,
"leadsLimit": 500,
"lockedLeads": 0,
"periodStart": "2026-01-01T00:00:00.000Z",
"periodEnd": "2026-03-01T23:59:59.999Z"
},
"leads": {
"total": 150,
"byStatus": {
"open": 45,
"qualified": 30,
"won": 50,
"lost": 25
},
"bySource": {
"gtm": 120,
"api": 20,
"manual": 10
}
},
"conversion": {
"qualified": 80,
"qualificationRate": 0.7,
"winRate": 0.625,
"averageValue": 2500,
"totalValue": 125000
}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}Analytics
Get Stats
Retrieve dashboard statistics including usage, lead counts, and conversion metrics
POST
/
api
/
stats
Get Stats
curl --request POST \
--url https://octanist.com/api/stats \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"period": "current",
"startDate": "2026-01-01",
"endDate": "2026-03-01"
}
'import requests
url = "https://octanist.com/api/stats"
payload = {
"period": "current",
"startDate": "2026-01-01",
"endDate": "2026-03-01"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({period: 'current', startDate: '2026-01-01', endDate: '2026-03-01'})
};
fetch('https://octanist.com/api/stats', 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://octanist.com/api/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'period' => 'current',
'startDate' => '2026-01-01',
'endDate' => '2026-03-01'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://octanist.com/api/stats"
payload := strings.NewReader("{\n \"period\": \"current\",\n \"startDate\": \"2026-01-01\",\n \"endDate\": \"2026-03-01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://octanist.com/api/stats")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"period\": \"current\",\n \"startDate\": \"2026-01-01\",\n \"endDate\": \"2026-03-01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://octanist.com/api/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"period\": \"current\",\n \"startDate\": \"2026-01-01\",\n \"endDate\": \"2026-03-01\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"usage": {
"leadsUsed": 150,
"leadsLimit": 500,
"lockedLeads": 0,
"periodStart": "2026-01-01T00:00:00.000Z",
"periodEnd": "2026-03-01T23:59:59.999Z"
},
"leads": {
"total": 150,
"byStatus": {
"open": 45,
"qualified": 30,
"won": 50,
"lost": 25
},
"bySource": {
"gtm": 120,
"api": 20,
"manual": 10
}
},
"conversion": {
"qualified": 80,
"qualificationRate": 0.7,
"winRate": 0.625,
"averageValue": 2500,
"totalValue": 125000
}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}Request Body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
period | string | No | current | Period: current, previous, custom |
startDate | string | If custom | - | Start date (YYYY-MM-DD) |
endDate | string | If custom | - | End date (YYYY-MM-DD) |
{}). Sending no body returns a 400 error.
Example Request
curl -X POST \
-H "X-API-KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{"period": "current"}' \
"https://octanist.com/api/stats"
Example Response
{
"success": true,
"data": {
"usage": {
"leadsUsed": 150,
"leadsLimit": 500,
"lockedLeads": 0,
"periodStart": "2026-01-01T00:00:00.000Z",
"periodEnd": "2026-03-01T23:59:59.999Z"
},
"leads": {
"total": 150,
"byStatus": {
"open": 45,
"qualified": 30,
"won": 50,
"lost": 25
},
"bySource": {
"gtm": 120,
"api": 20,
"manual": 10
}
},
"conversion": {
"qualified": 80,
"qualificationRate": 0.7,
"winRate": 0.625,
"averageValue": 2500,
"totalValue": 125000
}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}
The
periodStart and periodEnd fields in the usage object will be null if there is no active subscription.Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid request body, or missing dates for custom period |
| 400 | INVALID_DATE | Invalid date format (use YYYY-MM-DD) |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 500 | INTERNAL_ERROR | Server error |
Authorizations
API key for authentication
Body
application/json
Stats request parameters
Period to retrieve statistics for
Available options:
current, previous, custom Start date (YYYY-MM-DD). Required when period is custom.
Example:
"2026-01-01"
End date (YYYY-MM-DD). Required when period is custom.
Example:
"2026-03-01"
⌘I