Get cohort analysis (link creation cohorts × click aging)
GET
/api/v1/analytics/cohorts
const url = 'https://example.com/api/v1/analytics/cohorts?cohort_by=week&metric=clicks&periods=12';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/analytics/cohorts?cohort_by=week&metric=clicks&periods=12' \ --header 'Authorization: Bearer <token>'Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Query Parameters
Заголовок раздела «Query Parameters»cohort_by
string
Group links by creation week or month
metric
string
Metric to track across periods
periods
number
Number of aging periods to include
Responses
Заголовок раздела «Responses»Media typeapplication/json
object
cohortBy
required
string
metric
required
string
cohorts
required
Array<object>
object
cohortLabel
required
Cohort label (week or month)
string
cohortStart
required
Cohort start date (ISO)
string
linksCount
required
Number of links created in this cohort
number
periods
required
Click values per aging period
Array<object>
object
period
required
Period offset (0 = same week/month as creation)
number
value
required
Click count for this period
number
Example
{ "cohortBy": "week", "metric": "clicks", "cohorts": [ { "cohortLabel": "2026-W05", "cohortStart": "2026-01-27" } ]}