Short Links API
Manage your branded short links programmatically.
1. Shorten a URL
Create a new shortened link.
Endpoint: POST /v1/shorten
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
originalURL | string | Yes | The long URL to shorten. |
title | string | No | A custom title for the link. |
urlKey | string | No | Custom alias (e.g., my-link). If omitted, one is generated. |
expiresAt | string | No | ISO 8601 date string for link expiration. |
password | string | No | Password to protect the link. |
Example
curl -X POST https://qubitl.ink/api/v1/shorten \
-H "x-api-key: sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"originalURL": "https://www.google.com/search?q=developer",
"title": "Google Dev Search",
"urlKey": "dev-search"
}'
2. Bulk Create
Create multiple short links at once (Max 50 per request).
Endpoint: POST /v1/shorten/bulk
Example
curl -X POST https://qubitl.ink/api/v1/shorten/bulk \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '[
{ "originalURL": "https://google.com", "title": "Google" },
{ "originalURL": "https://facebook.com", "urlKey": "fb-link" }
]'
3. List Links
Retrieve a paginated list of your shortened links.
Endpoint: GET /v1/links
Parameters:
page: Page number (default: 1)limit: Items per page (default: 10)
Example
curl -X GET "https://qubitl.ink/api/v1/links?page=1&limit=5" \
-H "x-api-key: sk_live_your_key_here"
4. Get, Update, Delete
Get Link Details
GET /v1/links/:urlKey
Update Link
PUT /v1/links/:urlKey
{
"title": "New Title",
"activated": false
}
Delete Link
DELETE /v1/links/:urlKey