REST API v1.0 Documentation

Developer API Reference

Integrate robust URL shortening, custom link branding, analytics tracking, and automated URL management directly into your applications.

Get Your Personal API Key

Sign up or log in to generate an API key, increase hourly rate limits, and unlock authenticated endpoints.

Overview

The URL Shortener Pro API follows REST principles. It accepts JSON-encoded request bodies or simple query parameters and returns standard HTTP responses with JSON or plain-text payloads.

Fastest 1-Line Integration (GET API) Authenticated

Shorten any URL using a simple GET request. Returns the direct short link in plain text:

HTTP GET Request
https://url.utts.in/api-create.php?api_key=&url=https://google.com

Authentication & Access Tiers

Rate limits and feature availability depend on your account tier:

Guest
• No Auth Required
• Link Expiry: 12 hrs
• Fair Use Rate Limit
Free User
• API Key Required
• Limit: 1000 req/hr
• Link Expiry: 24 hrs
Premium
• API Key Required
• Limit: Unlimited
• Custom Slugs & Passwords
• Bulk API Access
Admin
• Full Global API Access
• Limit: Unlimited
• Link Expiry: Custom / Permanent
How to Pass Your API Key
Option A: HTTP Header (Recommended)
Authorization: Bearer
Option B: Query Parameter
GET ?api_key=&url=...

Interactive Live API Tester

Test the API right now in your browser.

Live Connected

Public & GET Endpoints

GET /api-create.php Plain Text GET

Returns the shortened URL in plain text response directly. Ideal for simple curl scripts or webhooks.

Request Parameters
Parameter Type Presence Description
url string Required The long URL to shorten (URL encoded).
api_key string Optional Your user API key for tracking and rate limit expansion.
cURL Command
curl -X GET "https://url.utts.in/api-create.php?api_key=&url=https://google.com"
GET /api.php?url={URL} Guest JSON

Shorten a URL via GET parameter and receive structured JSON metadata.

Example JSON Response
{
  "success": true,
  "short_url": "https://url.utts.in/abc123",
  "short_code": "abc123",
  "original_url": "https://google.com",
  "expires_at": "2026-11-12 19:29:11"
}
POST /api/public/shorten Guest POST

Shorten a URL via JSON POST body without authentication.

cURL Request
curl -X POST https://url.utts.in/api/public/shorten \
  -H "Content-Type: application/json" \
  -d '{"url": "https://github.com"}'

Authenticated Endpoints

POST /api/shorten Free Premium Admin

Create a shortened URL tied to your account with optional custom slug, password, description, and custom expiration time (Premium features).

Request Body (JSON)
Parameter Type Presence Description
url string Required The long destination URL.
custom_slug string Optional Custom short link slug (Premium feature).
password string Optional Passcode protection for link (Premium feature).
description string Optional Internal note for dashboard management.
cURL Request Example
curl -X POST https://url.utts.in/api/shorten \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://github.com/repository",
    "custom_slug": "my-project",
    "description": "Project Link"
  }'
GET /api/stats/{short_code} Free Premium

Fetch detailed click counts, geographic metrics, device types, and browser analytics for a short link.

cURL Request Example
curl -X GET "https://url.utts.in/api/stats/my-project" \
  -H "Authorization: Bearer "
DELETE /api/delete/{short_code} Free Premium

Delete a shortened URL link and its statistics.

cURL Request Example
curl -X DELETE "https://url.utts.in/api/delete/my-project" \
  -H "Authorization: Bearer "
POST /api/bulk-shorten Premium Only

Shorten multiple long URLs in a single API payload (up to 50 URLs per request).

cURL Request Example
curl -X POST https://url.utts.in/api/bulk-shorten \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://example.com/link1",
      "https://example.com/link2",
      "https://example.com/link3"
    ]
  }'

Code SDK & Snippets

cURL - POST Request
curl -X POST https://url.utts.in/api/shorten \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -d '{"url": "https://google.com"}'
JavaScript (Fetch API)
const apiKey = '';

fetch('https://url.utts.in/api/shorten', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    url: 'https://google.com'
  })
})
.then(res => res.json())
.then(data => console.log('Short URL:', data.data.short_url))
.catch(err => console.error(err));
Python 3 (Requests)
import requests

api_key = ''
headers = {
    'Authorization': f'Bearer {api_key}',
    'Content-Type': 'application/json'
}
data = {'url': 'https://google.com'}

response = requests.post('https://url.utts.in/api/shorten', headers=headers, json=data)
print(response.json())
PHP cURL
<?php
$apiKey = '';
$ch = curl_init('https://url.utts.in/api/shorten');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['url' => 'https://google.com']));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $apiKey,
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
?>

Error Codes & Statuses

HTTP Code Status Name Meaning & Cause
200 OK Success Request completed successfully.
400 Bad Request Invalid Input Missing URL parameter or invalid URL format.
401 Unauthorized Authentication Failed API Key is missing or invalid.
403 Forbidden Upgrade Required Custom slugs or bulk shorten require Premium membership.
429 Too Many Requests Rate Limit Exceeded You reached your tier's hourly request limit.