Xe Link API

Base URL: https://api.xeboki.com/v1/link

The Xe Link API gives you programmatic control over URL shortening, link management, and click analytics. Create short links at link.xeboki.com, track who clicked and from where, and pull traffic data into your own dashboards — all via REST.

Marketing automation

Generate short links for email campaigns, social posts, and ads on the fly.

Click tracking

Know exactly who clicked, when, from where, and via which referrer.

Geo & device analytics

Break down clicks by country, device type, and browser for targeting insights.

Reporting dashboards

Pull click data into your own analytics platform or BI tool.

Short link format: All links use the link.xeboki.com domain. A created link looks like https://link.xeboki.com/x8Kp2. Provide a custom code to make it memorable (e.g. summer26).

Authentication

All requests require a valid API key in the Authorization header. Create and manage keys at account.xeboki.com .

Authorization: Bearer xbk_live_your_key_here

Required scopes

link:links:readList and retrieve short links
link:links:writeCreate, update, and delete links
link:analytics:readAccess click analytics and traffic data

Analytics

Click analytics for each link — time series, referrers, geo, and device breakdown.

GET/v1/link/analytics/{id}

Click analytics

Returns click stats for a link over a given time period.

Query parameters

ParameterTypeDescription
periodstring"7d" | "30d" | "90d" | "all" (default: "30d").
tzstringIANA timezone for day bucketing, e.g. "America/New_York" (default: UTC).
curl "https://api.xeboki.com/v1/link/analytics/lnk_abc123?period=30d" \
  -H "Authorization: Bearer xbk_live_your_key_here"

Response 200

{
  "link_id": "lnk_abc123",
  "short_url": "https://link.xeboki.com/summer26",
  "period": "30d",
  "total_clicks": 1247,
  "unique_visitors": 834,
  "clicks_by_day": [
    { "date": "2026-03-31", "clicks": 45, "unique": 31 },
    { "date": "2026-03-30", "clicks": 72, "unique": 58 }
  ],
  "top_referrers": [
    { "referrer": "twitter.com",  "clicks": 312 },
    { "referrer": "instagram.com","clicks": 218 },
    { "referrer": "(direct)",     "clicks": 184 }
  ],
  "top_countries": [
    { "country": "US", "country_name": "United States",  "clicks": 567 },
    { "country": "GB", "country_name": "United Kingdom", "clicks": 143 }
  ],
  "devices": {
    "mobile": 712,
    "desktop": 489,
    "tablet": 46
  }
}
Referrer values: (direct) = no referrer (typed URL, bookmark, native app) · (qr) = QR code scan · All other values are the eTLD+1 of the Referer header.

Error codes

CodeErrorCause
400Bad RequestMissing or invalid fields in request body.
401UnauthorizedMissing or expired API key.
403ForbiddenAPI key lacks the required scope.
404Not FoundLink ID does not exist or belongs to a different account.
409ConflictCustom code already taken — choose a different code.
422Validation Errordestination_url is not a valid URL.
429Too Many RequestsRate limit exceeded. Check your plan limits.
500Internal Server ErrorContact support with your request ID.