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"
}
'{
"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"
}
}Retrieve dashboard statistics including usage, lead counts, and conversion metrics
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"
}
'{
"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"
}
}| 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.
curl -X POST \
-H "X-API-KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{"period": "current"}' \
"https://octanist.com/api/stats"
{
"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"
}
}
periodStart and periodEnd fields in the usage object will be null if there is no active subscription.| 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 |
API key for authentication
Stats request parameters
Period to retrieve statistics for
current, previous, custom Start date (YYYY-MM-DD). Required when period is custom.
"2026-01-01"
End date (YYYY-MM-DD). Required when period is custom.
"2026-03-01"