API Documentation

Complete guide to the Tinyur URL Shortener API

Back to Home

Shorten URL

Create a short URL from a long URL with optional custom alias

Request

Method:POST
Endpoint:/api/shorten
Base URL:https://tinyur.in

Parameters

url
stringRequired

The URL to be shortened

Example: https://example.com/very-long-url

customAlias
string

Custom alias for the short URL (3-50 characters, letters, numbers, hyphens, and underscores only)

Example: my-custom-alias

Request Body

{
  "url": "https://example.com/very-long-url",
  "customAlias": "my-custom-alias"
}

Response

Success Response

{
  "originalUrl": "string",
  "shortCode": "string",
  "shortUrl": "string"
}

Error Response

{
  "error": "string"
}