Read short link click analytics via the public API.
Get short link analytics
GET /public/v1/short-links/{shortLinkId}/analytics
Returns click data for a short link within your plan's analytics retention window.
Response fields
| Field | Description |
|---|---|
shortLinkId | The short link UUID |
since | Start of the retention window |
totalClicks | Clicks counted in ClickEvent records |
clickCount | Denormalized counter on the short link |
lastClickedAt | Timestamp of the most recent click |
daily | Daily click series (Pro/Business with advanced analytics) |
Example
curl https://api.to.it.com/v1/short-links/SHORT_LINK_ID/analytics \
-H "Authorization: Bearer toit_YOUR_KEY"
Retention windows
Analytics retention depends on your plan:
| Plan | Raw analytics | Aggregate analytics |
|---|---|---|
| Free | 7 days | 30 days |
| Personal | 30 days | 12 months |
| Pro | 90 days | 24 months |
| Business | 365 days | 36 months |