Skip to main content
POST
https://plvt.me
/
v1
/
url-shortener
/
create
curl -X POST "https://plvt.me/v1/url-shortener/create" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/very/long/url/path?param=value",
    "track_visits": true,
    "track_ip_address": true,
    "track_browser": true,
    "track_operating_system": true,
    "track_device_type": true,
    "track_referer_url": true
  }'
const response = await fetch('https://plvt.me/v1/url-shortener/create', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    url: 'https://example.com/very/long/url/path?param=value',
    track_visits: true,
    track_ip_address: true,
    track_browser: true,
    track_operating_system: true,
    track_device_type: true,
    track_referer_url: true
  })
});

const data = await response.json();
console.log(data.data.short_url);
import requests

response = requests.post(
    'https://plvt.me/v1/url-shortener/create',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'url': 'https://example.com/very/long/url/path?param=value',
        'track_visits': True,
        'track_ip_address': True,
        'track_browser': True,
        'track_operating_system': True,
        'track_device_type': True,
        'track_referer_url': True
    }
)

print(response.json()['data']['short_url'])
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://plvt.me/v1/url-shortener/create',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
        'Content-Type: application/json'
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'url' => 'https://example.com/very/long/url/path?param=value',
        'track_visits' => true,
        'track_ip_address' => true,
        'track_browser' => true,
        'track_operating_system' => true,
        'track_device_type' => true,
        'track_referer_url' => true
    ])
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
echo $data['data']['short_url'];
{
  "status": true,
  "message": "Short URL created successfully",
  "data": {
    "id": "abc123",
    "short_url": "https://plvt.me/abc123",
    "original_url": "https://example.com/very/long/url/path?param=value",
    "track_visits": true,
    "track_ip_address": true,
    "track_browser": true,
    "track_operating_system": true,
    "track_device_type": true,
    "track_referer_url": true,
    "created_at": "2026-01-15T12:00:00.000000Z"
  }
}
{
  "status": false,
  "message": "Validation failed",
  "errors": {
    "url": ["The url field is required."]
  }
}
{
  "status": false,
  "message": "Unauthenticated."
}
Shorten long URLs and optionally track visitor analytics including visits, IP addresses, browsers, devices, and referrer sources.
This endpoint uses a different base URL: https://plvt.me/v1

Request Body

url
string
required
The long URL to shorten
track_visits
boolean
default:"false"
Enable visit tracking
track_ip_address
boolean
default:"false"
Track visitor IP addresses
track_browser
boolean
default:"false"
Track visitor browser information
track_operating_system
boolean
default:"false"
Track visitor operating system
track_device_type
boolean
default:"false"
Track visitor device type (mobile, desktop, tablet)
track_referer_url
boolean
default:"false"
Track referrer URLs
curl -X POST "https://plvt.me/v1/url-shortener/create" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/very/long/url/path?param=value",
    "track_visits": true,
    "track_ip_address": true,
    "track_browser": true,
    "track_operating_system": true,
    "track_device_type": true,
    "track_referer_url": true
  }'
const response = await fetch('https://plvt.me/v1/url-shortener/create', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    url: 'https://example.com/very/long/url/path?param=value',
    track_visits: true,
    track_ip_address: true,
    track_browser: true,
    track_operating_system: true,
    track_device_type: true,
    track_referer_url: true
  })
});

const data = await response.json();
console.log(data.data.short_url);
import requests

response = requests.post(
    'https://plvt.me/v1/url-shortener/create',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'url': 'https://example.com/very/long/url/path?param=value',
        'track_visits': True,
        'track_ip_address': True,
        'track_browser': True,
        'track_operating_system': True,
        'track_device_type': True,
        'track_referer_url': True
    }
)

print(response.json()['data']['short_url'])
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://plvt.me/v1/url-shortener/create',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
        'Content-Type: application/json'
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'url' => 'https://example.com/very/long/url/path?param=value',
        'track_visits' => true,
        'track_ip_address' => true,
        'track_browser' => true,
        'track_operating_system' => true,
        'track_device_type' => true,
        'track_referer_url' => true
    ])
]);

$response = curl_exec($curl);
curl_close($curl);

$data = json_decode($response, true);
echo $data['data']['short_url'];
{
  "status": true,
  "message": "Short URL created successfully",
  "data": {
    "id": "abc123",
    "short_url": "https://plvt.me/abc123",
    "original_url": "https://example.com/very/long/url/path?param=value",
    "track_visits": true,
    "track_ip_address": true,
    "track_browser": true,
    "track_operating_system": true,
    "track_device_type": true,
    "track_referer_url": true,
    "created_at": "2026-01-15T12:00:00.000000Z"
  }
}
{
  "status": false,
  "message": "Validation failed",
  "errors": {
    "url": ["The url field is required."]
  }
}
{
  "status": false,
  "message": "Unauthenticated."
}

Tracking Options

Enable tracking options to gather analytics on your shortened URLs:
OptionDescription
track_visitsCount total visits to the short URL
track_ip_addressLog visitor IP addresses
track_browserIdentify visitor browser (Chrome, Firefox, Safari, etc.)
track_operating_systemIdentify visitor OS (Windows, macOS, iOS, Android, etc.)
track_device_typeCategorize visitors by device (mobile, desktop, tablet)
track_referer_urlTrack where visitors came from
Use shortened URLs in your SMS campaigns to save characters and track engagement!