v1.0.0OpenAPI 3.0

API Reference

RESTful API for the LinkPulse URL shortener. All endpoints accept and return JSON. Authentication is handled via session cookies (Auth.js).

Base URL: https://bossiq-linkpulse.vercel.app6 endpointsDownload OpenAPI spec →
POST/api/auth/registerPublic

Create a new user account

Register with email, name, and password. Passwords are hashed with bcrypt (12 rounds).

201 Created409 Conflict422 Validation Error

Request Body

{
  "name": "Jane Doe",
  "email": "jane@example.com",
  "password": "StrongPass1",
  "confirmPassword": "StrongPass1"
}

Response

{
  "message": "Account created successfully",
  "user": {
    "id": "clx...",
    "name": "Jane Doe",
    "email": "jane@example.com",
    "createdAt": "2026-01-01T00:00:00.000Z"
  }
}
POST/api/links🔒 Auth required

Create a shortened link

Generates a short URL with optional custom slug, title, expiration, click limit, and password protection.

201 Created409 Slug Taken422 Validation Error

Request Body

{
  "url": "https://example.com/very-long-url",
  "slug": "demo",
  "title": "Demo Link",
  "expiresAt": "2026-12-31T23:59:59Z",
  "maxClicks": 1000,
  "password": "optional-password"
}

Response

{
  "id": "clx...",
  "url": "https://example.com/very-long-url",
  "slug": "demo",
  "shortUrl": "https://bossiq-linkpulse.vercel.app/demo",
  "clicks": 0,
  "isActive": true,
  "createdAt": "2026-01-01T00:00:00.000Z"
}
GET/api/links🔒 Auth required

List all links for the current user

Returns a paginated, searchable list of the user's shortened links with click counts.

200 OK

Response

{
  "links": [
    {
      "id": "clx...",
      "url": "https://example.com",
      "slug": "demo",
      "title": "Demo Link",
      "clicks": 42,
      "isActive": true,
      "createdAt": "2026-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1,
    "totalPages": 1
  }
}
DELETE/api/links/:id🔒 Auth required

Delete a link

Permanently removes a link and all associated click data. Owner verification enforced — returns 403 if the link belongs to another user.

200 OK403 Forbidden404 Not Found

Response

{ "success": true }
GET/api/links/:id/qr🔒 Auth required

Generate a QR code for a link

Returns a QR code image for the short URL. Supports SVG (default) and PNG formats via the "format" query parameter. Size configurable via "size" (default 256).

200 OK (image/svg+xml or image/png)404 Not Found

Response

Binary image data (SVG or PNG)
GET/[slug]Public

Redirect to original URL

Performs a 301 redirect to the original URL. Logs click analytics (device, browser, OS, referrer, IP) asynchronously without blocking the redirect. Checks expiration, click limits, and active status.

301 Redirect404 Not Found (expired/inactive/missing)