Home

API Documentation | lnk.ink

Explore the lnk.ink API for creating and managing short links with advanced features like custom codes, password protection, and detailed analytics.

Endpoints

Overview

The lnk.ink API allows you to create, manage, and track short links programmatically with features like custom codes, expiration, password protection, and detailed analytics.

Key Features

  • Create short links with custom or auto-generated codes
  • Protect links with passwords
  • Set expiration by time (minutes, hours, days) or click count
  • Track detailed analytics (clicks, devices, browsers, countries, referrers)
  • Manage links with secret codes (full control mode)
  • Retrieve total link count

Rate Limiting

API requests are rate-limited based on IP address to prevent abuse. Exceeding the limit returns a 429 status code with the message: 'Too many requests. Please try again later.'

Base URL

https://lnk.ink/api/links

Create Link via URL

You can create a shortened link using ?url=... query. This defaults to statsOnly mode (no tracking or editing).

Basic link:

https://lnk.ink/api/links/create?url=https://example.com

With custom short code:

https://lnk.ink/api/links/create?url=https://example.com&custom=hello123

Return only plain URL (no JSON):

https://lnk.ink/api/links/create?url=https://example.com&format=simple

Response Format

All responses are in JSON format with status, data, and optional error fields.

{
  "status": 200,
  "data": { /* Response data */ },
  "error": null,
  "details": null
}