Create Short Link

Create a new short link with optional custom URL and metadata.

Endpoint

POST /v2/external/client/short-links

Request Body

{
  "originalUrl": "https://example.com/very/long/url",
  "customUrl": "my-custom-link",
  "title": "My Link Title",
  "category": "social",
  "categoryTitle": "Social Media",
  "categoryValue": "instagram"
}

Parameters

Parameter Type Required Description
originalUrl string Yes The original URL to shorten
customUrl string No Custom short URL (max 24 characters, must be unique)
title string No Title for the link
category string No Category identifier
categoryTitle string No Display name for category
categoryValue string No Category value

Response

{
  "status": true,
  "message": "Short link created successfully",
  "data": {
    "id": "507f1f77bcf86cd799439011",
    "originalUrl": "https://example.com/very/long/url",
    "shortUrl": "my-custom-link",
    "title": "My Link Title",
    "category": "social",
    "categoryTitle": "Social Media",
    "categoryValue": "instagram",
    "isActive": true,
    "isCustomUrl": true,
    "createdAt": "2024-01-15T10:30:00Z",
    "createdBy": "user-id"
  }
}

Notes

  • If customUrl is not provided, a random 4-character alphanumeric code will be generated
  • Custom URLs must be unique across all users
  • All plan limits apply (max links, custom URLs, etc.)
  • Domain blacklist validation is performed automatically