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.
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_hereRequired scopes
link:links:read | List and retrieve short links |
link:links:write | Create, update, and delete links |
link:analytics:read | Access click analytics and traffic data |
Links
Create and manage short links. Each link has a unique code that maps to a destination URL.
/v1/link/linksCreate a short link
Shorten a URL. Optionally provide a custom code, title, or expiry.
Request body
| Parameter | Type | Description |
|---|---|---|
destination_urlrequired | string | The full URL to redirect to. |
title | string | Human-readable label for the link (for your reference only). |
code | string | Custom short code (e.g. "summer26"). Auto-generated if omitted. Must be unique. |
expires_at | ISO 8601 | Optional expiry datetime. Link stops redirecting after this time. |
curl -X POST https://api.xeboki.com/v1/link/links \
-H "Authorization: Bearer xbk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"destination_url": "https://example.com/summer-sale-2026",
"title": "Summer Sale 2026",
"code": "summer26"
}'Response 201
{
"id": "lnk_abc123",
"code": "summer26",
"short_url": "https://link.xeboki.com/summer26",
"destination_url": "https://example.com/summer-sale-2026",
"title": "Summer Sale 2026",
"is_active": true,
"expires_at": null,
"total_clicks": 0,
"created_at": "2026-03-31T12:00:00Z"
}/v1/link/linksList links
Returns all short links for your account, newest first.
Query parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1). |
limit | integer | Results per page, max 100 (default: 20). |
active | boolean | Filter by active (true) or inactive (false) links. |
q | string | Search by title or destination URL. |
curl "https://api.xeboki.com/v1/link/links?page=1&limit=20" \
-H "Authorization: Bearer xbk_live_your_key_here"Response 200
{
"data": [
{
"id": "lnk_abc123",
"code": "summer26",
"short_url": "https://link.xeboki.com/summer26",
"destination_url": "https://example.com/summer-sale-2026",
"title": "Summer Sale 2026",
"is_active": true,
"total_clicks": 1247,
"created_at": "2026-03-31T12:00:00Z"
}
],
"total": 42,
"page": 1,
"limit": 20
}/v1/link/links/{id}Get a link
Retrieve a single link by its ID.
curl https://api.xeboki.com/v1/link/links/lnk_abc123 \
-H "Authorization: Bearer xbk_live_your_key_here"Response 200
{
"id": "lnk_abc123",
"code": "summer26",
"short_url": "https://link.xeboki.com/summer26",
"destination_url": "https://example.com/summer-sale-2026",
"title": "Summer Sale 2026",
"is_active": true,
"expires_at": null,
"total_clicks": 1247,
"created_at": "2026-03-31T12:00:00Z"
}/v1/link/links/{id}Update a link
Update the destination URL, title, or active status. Only provided fields are changed.
is_active: false to disable a link without deleting it — clicks will return 404 until re-enabled. Prefer this over deletion if you may reuse the link.Request body
| Parameter | Type | Description |
|---|---|---|
destination_url | string | New destination URL. |
title | string | New label for the link. |
is_active | boolean | Set false to disable, true to re-enable. |
expires_at | ISO 8601 | Update or remove the expiry. Pass null to remove. |
curl -X PATCH https://api.xeboki.com/v1/link/links/lnk_abc123 \
-H "Authorization: Bearer xbk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"destination_url": "https://example.com/summer-sale-updated",
"is_active": true
}'Response 200
{
"id": "lnk_abc123",
"code": "summer26",
"short_url": "https://link.xeboki.com/summer26",
"destination_url": "https://example.com/summer-sale-updated",
"title": "Summer Sale 2026",
"is_active": true,
"total_clicks": 1247,
"updated_at": "2026-03-31T14:30:00Z"
}/v1/link/links/{id}Delete a link
Permanently deletes a link and all its analytics data. This action cannot be undone.
is_active: false (via PATCH) if you may want to restore the link later.curl -X DELETE https://api.xeboki.com/v1/link/links/lnk_abc123 \
-H "Authorization: Bearer xbk_live_your_key_here"Response 204
Analytics
Click analytics for each link — time series, referrers, geo, and device breakdown.
/v1/link/analytics/{id}Click analytics
Returns click stats for a link over a given time period.
Query parameters
| Parameter | Type | Description |
|---|---|---|
period | string | "7d" | "30d" | "90d" | "all" (default: "30d"). |
tz | string | IANA 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
}
}(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
| Code | Error | Cause |
|---|---|---|
| 400 | Bad Request | Missing or invalid fields in request body. |
| 401 | Unauthorized | Missing or expired API key. |
| 403 | Forbidden | API key lacks the required scope. |
| 404 | Not Found | Link ID does not exist or belongs to a different account. |
| 409 | Conflict | Custom code already taken — choose a different code. |
| 422 | Validation Error | destination_url is not a valid URL. |
| 429 | Too Many Requests | Rate limit exceeded. Check your plan limits. |
| 500 | Internal Server Error | Contact support with your request ID. |