Перейти к содержимому

Get cohort analysis (link creation cohorts × click aging)

GET
/api/v1/analytics/cohorts
curl --request GET \
--url 'https://example.com/api/v1/analytics/cohorts?cohort_by=week&metric=clicks&periods=12' \
--header 'Authorization: Bearer <token>'
cohort_by
string
default: week
Allowed values: week month

Group links by creation week or month

metric
string
default: clicks
Allowed values: clicks unique_clicks

Metric to track across periods

periods
number
default: 12 >= 1 <= 52

Number of aging periods to include

Media typeapplication/json
object
cohortBy
required
string
Allowed values: week month
metric
required
string
Allowed values: clicks unique_clicks
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"
}
]
}