Help & Features

Everything you need to know about LMQ's link shortening features.

Core Features

01

Expiration Time

Set a time limit on any short link. Once the expiration passes, the link stops working and returns a 404. Useful for time-sensitive promotions, temporary access, or event-based campaigns.

curl -X POST https://api.lmq.name.ng/api/v1/shorten \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/promo",
    "expires_in": 24
  }'

// The link will self-destruct 24 hours after creation.
// Response includes "expires_at" timestamp.

Set expires_in to the number of hours. Omit or set to 0 for a permanent link.

02

Custom Alias / Token

Replace the random short code with a memorable, branded slug. Your alias must be 3–20 characters long and can only contain letters, numbers, and hyphens.

curl -X POST https://api.lmq.name.ng/api/v1/shorten \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/whitepaper",
    "custom_token": "whitepaper-q2"
  }'

// Your short link becomes: https://lmq.name.ng/whitepaper-q2
// Custom tokens cannot be used with bulk shortening.

Use custom_token to claim a specific slug. A conflict returns HTTP 409.

03

A/B Routing

Split traffic across multiple destination URLs with weighted routing. Each visit randomly selects a destination based on the weights you assign. Great for A/B testing landing pages or gradually rolling out new content.

curl -X POST https://api.lmq.name.ng/api/v1/shorten \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/control",
    "routes": [
      { "url": "https://example.com/variant-a", "weight": 70 },
      { "url": "https://example.com/variant-b", "weight": 30 }
    ]
  }'

// 70% of clicks go to variant-a, 30% to variant-b.
// The base "url" is used as fallback if routes are empty.

Weights must be positive integers. Routes are optional — omit them for a standard single-destination link.

04

Password Lock

Protect a short link with a password. Visitors must enter the password on the unlock page before they are redirected to the destination. The password is hashed with bcrypt before storage — LMQ never stores plaintext passwords.

curl -X POST https://api.lmq.name.ng/api/v1/shorten \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/private",
    "password": "s3cret!"
  }'

// Visiting the short link shows a password prompt.
// POST /api/v1/verify-password with the correct
// password returns a redirect to the destination.

Set password to any string. There is no way to recover a lost password.

05

Burn After Reading

Create a self-destructing link that can only be viewed once. After the first visit, the link is atomically deleted from the database. Any subsequent visit returns a 404. Ideal for sharing sensitive, one-time information.

curl -X POST https://api.lmq.name.ng/api/v1/shorten \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/sensitive",
    "burn_after_reading": true
  }'

// The first click redirects and the link vanishes.
// No analytics are recorded for BAR links.

Combine with password for a double-locked one-time link. The link is consumed on successful password verification.

Quick Start

The simplest way to shorten a link is a single POST with just a url field. All other features are optional and can be mixed and matched freely.

curl -X POST https://api.lmq.name.ng/api/v1/shorten \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

// Response (201 Created):
{
  "data": {
    "results": [{
      "token": "aB3xY7",
      "short_url": "https://lmq.name.ng/aB3xY7",
      "long_url": "https://example.com",
      "created_at": "2026-07-21T00:00:00Z",
      "has_password": false,
      "burn_after_reading": false
    }]
  },
  "error": null
}

All features can be combined — for example, a password-protected, burn-after-reading link with a custom alias and A/B routes.

Need More Help?

Visit the API documentation for the full developer reference, including analytics, bulk CSV upload, and the analytics export endpoint.

© 2026 LMQ. ALL RIGHTS RESERVED.

AMANI