Skip to main content

Short Links API

Manage your branded short links programmatically.

1. Shorten a URL

Create a new shortened link.

Endpoint: POST /v1/shorten

Request Body

FieldTypeRequiredDescription
originalURLstringYesThe long URL to shorten.
titlestringNoA custom title for the link.
urlKeystringNoCustom alias (e.g., my-link). If omitted, one is generated.
expiresAtstringNoISO 8601 date string for link expiration.
passwordstringNoPassword 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" }
]'

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 /v1/links/:urlKey

PUT /v1/links/:urlKey

{
"title": "New Title",
"activated": false
}

DELETE /v1/links/:urlKey