Skip to main content
Version: main (unreleased)

LinkAnalyticsResponse

link objectrequired
idstringrequired
Example: link-123456
org_idstringrequired
Example: org-789
short_codestringrequired
Example: abc123
destination_urlstringrequired
Example: https://example.com/very/long/url
titlestring | nullnullable
Example: My Awesome Link
created_bystringrequired
Example: user-123
created_atinteger<int64>required
Example: 1609459200
updated_atinteger,null<int64>nullable
Example: 1609459300
expires_atinteger,null<int64>nullable
Example: 1640995200
statusLinkStatus (string)required

Possible values: [active, disabled, blocked]

click_countinteger<int64>required
Example: 42
tagsstring[]required
Example: ["marketing","social"]
utm_params object
oneOf
null
forward_query_paramsboolean | nullnullable

Whether to forward visitor query params to the destination (Pro+ only). None = use org default (resolved at KV write time).

redirect_typestringrequired

HTTP redirect type: 301 (permanent) or 307 (temporary). Default is 301 for SEO, 307 available on Pro+ plans.

Example: 301
ios_urlstring | nullnullable

iOS-specific destination URL (Business tier feature). Redirects iPhone/iPad users to this URL instead of the default.

Example: https://apps.apple.com/app/id123456789
android_urlstring | nullnullable

Android-specific destination URL (Business tier feature). Redirects Android users to this URL instead of the default.

Example: https://play.google.com/store/apps/details?id=com.example
desktop_urlstring | nullnullable

Desktop-specific destination URL (Business tier feature). Redirects desktop users (Windows, macOS, Linux) to this URL instead of the default.

Example: https://example.com/desktop-app
custom_domainstring | nullnullable

Custom domain this link was created under (immutable after creation). None means the link uses the default short domain.

Example: go.mybrand.com
total_clicks_in_rangeinteger<int64>required
Example: 150
clicks_over_time object[]required
  • Array [
  • datestringrequired
    Example: 2024-01-15
    countinteger<int64>required
    Example: 42
  • ]
  • top_referrers object[]required
  • Array [
  • referrerstringrequired
    Example: https://google.com
    countinteger<int64>required
    Example: 15
  • ]
  • top_countries object[]required
  • Array [
  • countrystringrequired
    Example: US
    countinteger<int64>required
    Example: 25
  • ]
  • top_user_agents object[]required
  • Array [
  • user_agentstringrequired
    Example: Mozilla/5.0...
    countinteger<int64>required
    Example: 10
  • ]
  • analytics_gatedboolean | nullnullable

    Whether analytics data is gated due to tier limits

    gated_reasonstring | nullnullable

    Reason analytics are gated (e.g., "click_limit_exceeded", "retention_limited")

    LinkAnalyticsResponse
    {
    "link": {
    "id": "link-123456",
    "org_id": "org-789",
    "short_code": "abc123",
    "destination_url": "https://example.com/very/long/url",
    "title": "My Awesome Link",
    "created_by": "user-123",
    "created_at": 1609459200,
    "updated_at": 1609459300,
    "expires_at": 1640995200,
    "status": "active",
    "click_count": 42,
    "tags": [
    "marketing",
    "social"
    ],
    "utm_params": "null",
    "forward_query_params": true,
    "redirect_type": "301",
    "ios_url": "https://apps.apple.com/app/id123456789",
    "android_url": "https://play.google.com/store/apps/details?id=com.example",
    "desktop_url": "https://example.com/desktop-app",
    "custom_domain": "go.mybrand.com"
    },
    "total_clicks_in_range": 150,
    "clicks_over_time": [
    {
    "date": "2024-01-15",
    "count": 42
    }
    ],
    "top_referrers": [
    {
    "referrer": "https://google.com",
    "count": 15
    }
    ],
    "top_countries": [
    {
    "country": "US",
    "count": 25
    }
    ],
    "top_user_agents": [
    {
    "user_agent": "Mozilla/5.0...",
    "count": 10
    }
    ],
    "analytics_gated": true,
    "gated_reason": "string"
    }