Build with
AsiaBio.Link
A clean, fast REST API to create short links, track analytics, and manage everything โ from any language, any platform.
7
Endpoints
120
Req / min
< 100ms
Avg response
99.9%
Uptime SLA
Get your API Key
Sign up for a Pro plan, then generate a key from your dashboard.
Make your first call
Pass the key as a Bearer token. You'll get a JSON response in milliseconds.
You're live
Create links, fetch analytics, automate anything โ at scale.
Quick Start
From zero to your first short link in under 60 seconds.
# 1. Create a short link
curl -X POST https://asiabio.link/api/v1/links \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-long-url.com/path",
"title": "My First Link"
}'
# 2. Response โ your new short link
# {
# "success": true,
# "data": {
# "id": 1,
# "short_url": "https://asiabio.link/AbCd12",
# "clicks": 0
# }
# }
Authentication
Every request must include your API key. Use the Authorization header โ it's the most secure method.
Authorization: Bearer {key}
X-API-Key: {key}
?api_key={key}
Go to Dashboard โ API Access. If you don't have a key yet, click "Generate API Key". Keys start with ab_live_.
Rate Limits
Limits protect the API for everyone. Two separate limits apply to all requests.
Global Request Limit
Applies to every endpoint
requests per minute ยท resets every 60 seconds
Monthly Link Creation
Applies to POST /links only
check usage via GET /me โ links_this_month
When rate limited, the API returns:
{
"error": true,
"code": "MONTHLY_LIMIT_REACHED",
"message": "You have reached your monthly link creation limit of 50.",
"status": 429,
"docs": "https://asiabio.link/api-docs"
}
Error Codes
All errors share a consistent structure with a machine-readable code and a plain-English message that explains what went wrong and how to fix it.
Error envelope:
{
"error": true,
"code": "MACHINE_READABLE_CODE",
"message": "A plain-English description of the problem and how to fix it.",
"status": 401,
"docs": "https://asiabio.link/api-docs"
}
| HTTP | Error Code | When it happens |
|---|---|---|
| 401 | MISSING_API_KEY | No key was provided in the request. |
| 401 | INVALID_API_KEY | The key is wrong, expired, or revoked. |
| 403 | ACCOUNT_SUSPENDED | Your account has been suspended by an admin. |
| 403 | PLAN_RESTRICTION | API access is not included in your current plan. |
| 403 | FEATURE_NOT_AVAILABLE | The field requires a plan feature (e.g. custom_codes, scheduling). |
| 403 | LINK_SUSPENDED | The link was suspended by an admin โ read-only. |
| 404 | LINK_NOT_FOUND | No link with that ID exists on your account. |
| 404 | ENDPOINT_NOT_FOUND | The URL path doesn't match any API route. |
| 422 | VALIDATION_ERROR | A field is missing or invalid. Check the "errors" object. |
| 422 | CODE_TAKEN | That custom short code is already in use. |
| 422 | DOMAIN_NOT_FOUND | Custom domain not found or not active on your account. |
| 429 | MONTHLY_LIMIT_REACHED | Monthly link creation cap reached. Upgrade or wait for reset. |
/api/v1/me
Returns your account details and current plan usage. Use this to check remaining monthly link quota and available features before making link creation requests.
cURL Example
curl https://asiabio.link/api/v1/me \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK{
"success": true,
"data": {
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"plan": "pro",
"plan_expires_at": "2026-12-31T23:59:59+00:00",
"links_this_month": 12,
"monthly_link_limit": 500,
"features": {
"custom_codes": true,
"custom_domain": true,
"api_access": true,
"scheduling": true,
"analytics_days": 0
},
"created_at": "2026-01-15T08:00:00+00:00"
}
}
/api/v1/links
Returns a paginated list of all short links in your account, newest first. Use per_page and page to paginate through large sets.
Parameters
| Name | Type | In | Required? | Description |
|---|---|---|---|---|
| per_page | integer | Query | OPT | Number of results per page. Max 100, default 20. |
| page | integer | Query | OPT | Page number. Default 1. |
cURL Example
curl "https://asiabio.link/api/v1/links?per_page=20&page=1" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK{
"success": true,
"data": [
{
"id": 42,
"code": "my-campaign",
"short_url": "https://asiabio.link/my-campaign",
"original_url": "https://example.com/very-long-path/to/a/page",
"title": "Spring Campaign",
"status": "Active",
"is_active": true,
"is_suspended": false,
"clicks": 1284,
"redirect_type": 302,
"expires_at": null,
"has_password": false,
"domain": "asiabio.link",
"created_at": "2026-04-01T12:00:00+00:00"
}
],
"pagination": {
"current_page": 1,
"last_page": 5,
"per_page": 20,
"total": 94,
"next_page_url": "https://asiabio.link/api/v1/links?page=2",
"prev_page_url": null
}
}
/api/v1/links
Creates a new short link and returns HTTP 201. Advanced fields (custom codes, scheduling, passwords, click limits) are gated by your plan features โ the API will tell you exactly which feature is needed if a field is rejected.
Parameters
| Name | Type | In | Required? | Description |
|---|---|---|---|---|
| url | string | Body | REQ | The destination URL to shorten. Max 2048 characters. |
| code | string | Body | OPT | Custom short code (a-z, 0-9, dashes, 3โ30 chars). Needs custom_codes feature. |
| title | string | Body | OPT | A human label for the link. Visible in your dashboard only. Max 255 chars. |
| domain | string | Body | OPT | Custom domain hostname (e.g. go.yourbrand.com). Must be active on your account. |
| redirect_type | integer | Body | OPT | HTTP redirect code. One of 301, 302 (default), 307, 308. |
| is_active | boolean | Body | OPT | Start the link in paused state (false) or active (true, default). |
| expires_at | datetime | Body | OPT | ISO 8601 expiry. Link auto-deactivates after this. Needs scheduling feature. |
| starts_at | datetime | Body | OPT | ISO 8601 activation date. Link is hidden until then. Needs scheduling feature. |
| click_limit | integer | Body | OPT | Deactivate after N total clicks. Needs click_limits feature. |
| password | string | Body | OPT | Require this password before redirecting. Needs password_protection feature. |
cURL Example
curl -X POST https://asiabio.link/api/v1/links \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/very-long-url",
"code": "my-campaign",
"title": "Spring Campaign 2026",
"expires_at": "2026-06-30T23:59:59Z",
"redirect_type": 302
}'
Response
200 OK{
"success": true,
"message": "Short link created successfully.",
"data": {
"id": 99,
"code": "my-campaign",
"short_url": "https://asiabio.link/my-campaign",
"original_url": "https://example.com/very-long-url",
"title": "Spring Campaign 2026",
"status": "Active",
"is_active": true,
"is_suspended": false,
"clicks": 0,
"redirect_type": 302,
"expires_at": "2026-06-30T23:59:59+00:00",
"starts_at": null,
"click_limit": null,
"has_password": false,
"domain": "asiabio.link",
"created_at": "2026-04-25T10:00:00+00:00",
"updated_at": "2026-04-25T10:00:00+00:00"
}
}
/api/v1/links/{id}
Fetches a single link by its numeric ID. You can only access links that belong to your account. Deleted links return 404.
Parameters
| Name | Type | In | Required? | Description |
|---|---|---|---|---|
| id | integer | URL | REQ | The numeric ID of the link (from the id field in list/create responses). |
cURL Example
curl https://asiabio.link/api/v1/links/42 \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK{
"success": true,
"data": {
"id": 42,
"code": "my-campaign",
"short_url": "https://asiabio.link/my-campaign",
"original_url": "https://example.com/very-long-url",
"title": "Spring Campaign 2026",
"status": "Active",
"is_active": true,
"is_suspended": false,
"suspend_reason": null,
"clicks": 1284,
"redirect_type": 302,
"expires_at": "2026-06-30T23:59:59+00:00",
"starts_at": null,
"click_limit": null,
"has_password": false,
"domain": "asiabio.link",
"created_at": "2026-04-25T10:00:00+00:00",
"updated_at": "2026-04-25T10:00:00+00:00"
}
}
/api/v1/links/{id}
Updates one or more fields on an existing link. Only send the fields you want to change โ everything else stays the same. Admin-suspended links cannot be edited.
Parameters
| Name | Type | In | Required? | Description |
|---|---|---|---|---|
| id | integer | URL | REQ | Numeric link ID. |
| url | string | Body | OPT | New destination URL. |
| title | string | Body | OPT | New label / title. |
| is_active | boolean | Body | OPT | true to resume, false to pause. |
| redirect_type | integer | Body | OPT | 301, 302, 307, or 308. |
| expires_at | datetime | Body | OPT | New expiry (ISO 8601). Set to null to remove. |
| click_limit | integer | Body | OPT | New click limit. Needs click_limits feature. |
cURL Example
# Pause a link
curl -X PUT https://asiabio.link/api/v1/links/42 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"is_active": false, "title": "Paused for review"}'
Response
200 OK{
"success": true,
"message": "Link updated successfully.",
"data": {
"id": 42,
"code": "my-campaign",
"title": "Paused for review",
"status": "Paused",
"is_active": false,
"clicks": 1284,
"updated_at": "2026-04-25T11:00:00+00:00"
}
}
/api/v1/links/{id}
Permanently deletes a link and all of its click data. This is irreversible. Admin-suspended links cannot be deleted. Consider pausing (PUT is_active=false) instead if you might need the link later.
Parameters
| Name | Type | In | Required? | Description |
|---|---|---|---|---|
| id | integer | URL | REQ | Numeric link ID. |
cURL Example
curl -X DELETE https://asiabio.link/api/v1/links/42 \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK{
"success": true,
"message": "Link ID 42 has been deleted."
}
/api/v1/links/{id}/stats
Returns aggregated click analytics for a link. The data window is controlled by your plan's analytics_days setting โ 0 means unlimited history. Includes a full 30-day daily series, plus breakdowns by browser, country, and referrer domain.
Parameters
| Name | Type | In | Required? | Description |
|---|---|---|---|---|
| id | integer | URL | REQ | Numeric link ID. |
cURL Example
curl https://asiabio.link/api/v1/links/42/stats \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK{
"success": true,
"data": {
"link": {
"id": 42,
"code": "my-campaign",
"short_url": "https://asiabio.link/my-campaign",
"title": "Spring Campaign 2026"
},
"total_clicks": 1284,
"period_clicks": 890,
"analytics_window_days": 30,
"clicks_by_day": [
{ "date": "2026-04-24", "clicks": 42 },
{ "date": "2026-04-25", "clicks": 38 }
],
"top_browsers": {
"Chrome": 720, "Safari": 310, "Firefox": 180, "Edge": 74
},
"top_countries": {
"Bangladesh": 480, "United States": 210, "India": 140
},
"top_referrer_domains": {
"google.com": 360, "facebook.com": 210, "t.co": 90
}
}
}
Start Building
Integrate in minutes
Generate your API key from the dashboard and make your first call โ no SDK required.