LinksGet link analytics
Links

Get link analytics

Retrieve click analytics for a specific short link, including total clicks, unique visitors, referrers, and geographic breakdown.

curl -X GET "https://api.mythic-analytics.com/api/v1/clients/example_string/links/example_string/analytics?period=24h" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "total_clicks": 1247,
    "unique_visitors": 892,
    "referrers": [
      {
        "source": "google.com",
        "clicks": 340
      }
    ],
    "countries": [
      {
        "country": "US",
        "clicks": 580
      }
    ],
    "daily_clicks": [
      {
        "date": "2024-06-15",
        "clicks": 42
      }
    ]
  }
}
GET
/clients/{id}/links/{linkId}/analytics
GET
Security Scheme
Bearer Tokenstring
Required

Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY

Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY
path
idstring
Required

Client identifier.

Pattern: ^[a-zA-Z0-9_-]{1,255}$
path
linkIdstring
Required

Short link identifier.

query
periodstring

Time period for analytics. Default: 30d.

Options: 24h, 7d, 30d, 90d, all
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY

Path Parameters

idstring
Required

Client identifier.

linkIdstring
Required

Short link identifier.

Query Parameters

periodstring

Time period for analytics. Default: 30d.

Allowed values:24h7d30d90dall

Responses

successboolean
dataobject