API Documentation

Integrate Short into your applications with our RESTful API.

🔑 Authentication

All API requests require an API key. Generate one from your Dashboard → API Keys.

Header: X-Api-Key: sk_your_api_key_here

Or pass as query parameter: ?api_key=sk_your_api_key_here

🌐 Base URL
https://your-domain.com/api/v1
⚡ Shorten URL
POST /api/v1/shorten

Create a new short link.

Request Body (JSON)

{ "url": "https://example.com/very-long-url", // required "customAlias": "my-brand", // optional "title": "My Campaign Link", // optional "tags": "marketing, social", // optional "expiresAt": "2025-12-31T23:59:59", // optional "password": "secret123", // optional "maxClicks": 1000 // optional }

Response

{ "success": true, "data": { "id": 42, "shortUrl": "https://short.link/AbCdEf", "shortCode": "AbCdEf", "originalUrl": "https://example.com/very-long-url", "title": "My Campaign Link", "createdAt": "2025-01-15T10:30:00Z" } }
📋 List Links
GET /api/v1/links

Retrieve your links with pagination.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20, max: 100)
searchstringSearch links by URL, code, or title
📊 Link Analytics
GET /api/v1/links/:id/stats

Get detailed analytics for a specific link.

Query Parameters

ParameterTypeDescription
daysintegerAnalytics window in days (default: 30)
✏️ Update Link
PUT /api/v1/links/:id

Request Body (JSON)

{ "title": "Updated Title", "tags": "updated, tags", "isActive": false, "expiresAt": "2026-06-30" }
🗑️ Delete Link
DELETE /api/v1/links/:id

Permanently delete a link. This action cannot be undone.

🚦 Rate Limits
PlanAPI AccessRequests/Min
FreeNo-
StarterNo-
ProYes60
EnterpriseYesUnlimited
❌ Error Codes
CodeMeaning
400Bad request — missing or invalid parameters
401Unauthorized — missing or invalid API key
403Forbidden — plan doesn't include API access
404Not found — link doesn't exist or belongs to another user
500Server error — contact support