Detect traffic anomalies (spikes/drops) for a link
GET
/api/v1/links/{code}/analytics/anomalies
const url = 'https://example.com/api/v1/links/example/analytics/anomalies?lookback_days=60&threshold=3';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/links/example/analytics/anomalies?lookback_days=60&threshold=3' \ --header 'Authorization: Bearer <token>'Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»code
required
string
Short code or custom alias
Query Parameters
Заголовок раздела «Query Parameters»lookback_days
number
Number of days to look back for anomaly detection
threshold
number
Z-score threshold for anomaly detection
Responses
Заголовок раздела «Responses»Media typeapplication/json
object
shortCode
required
string
lookbackDays
required
number
threshold
required
number
anomalies
required
Array<object>
object
date
required
string
type
required
string
value
required
Actual click count on this day
number
baselineMean
required
Rolling mean baseline
number
baselineStddev
required
Rolling standard deviation
number
zScore
required
Z-score of the anomaly
number
severity
required
string
Example
{ "anomalies": [ { "date": "2026-02-15", "type": "spike", "severity": "low" } ]}Forbidden — not the owner
Link not found