API Documentation

Integrate our URL shortener with your applications

Create Short Links

Generate short URLs instantly with a simple API call.

View Documentation →

Get Link Stats

Retrieve detailed analytics about your short links.

View Documentation →

Authentication

Secure your API calls with authentication tokens.

View Documentation →

Authentication

All API endpoints require authentication. You can get your API key from your account dashboard.

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/very/long/url"}' \
  https://shortener.vtools.shop/api/v1/create

Keep your API key secure. Do not share it or commit it to version control.

Create Short Link

Create a new short link by sending a POST request to the API endpoint.

Endpoint

POST https://shortener.vtools.shop/api/v1/create

Request Parameters

Parameter Type Required Description
url string Yes The long URL to shorten
custom_code string No Custom short code (must be unique)

Example Request

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/very/long/url","custom_code":"example"}' \
  https://shortener.vtools.shop/api/v1/create

Example Response

{
    "success": true,
    "short_code": "example",
    "short_url": "https://shortener.vtools.shop/example",
    "original_url": "https://example.com/very/long/url"
}

Get Link Statistics

Retrieve statistics for a short link by sending a GET request to the API endpoint.

Endpoint

GET https://shortener.vtools.shop/api/v1/stats?code=SHORT_CODE

Query Parameters

Parameter Type Required Description
code string Yes The short code to get stats for

Example Request

curl -X GET \
  -H "Authorization: Bearer YOUR_API_KEY" \
  https://shortener.vtools.shop/api/v1/stats?code=example

Example Response

{
    "success": true,
    "short_code": "example",
    "original_url": "https://example.com/very/long/url",
    "total_clicks": 42,
    "clicks": [
        {
            "ip_address": "192.168.1.1",
            "user_agent": "Mozilla/5.0...",
            "referrer": "https://google.com",
            "country": "United States",
            "city": "New York",
            "device_type": "Desktop",
            "os": "Windows",
            "browser": "Chrome",
            "clicked_at": "2023-06-15 14:30:22"
        },
        ...
    ]
}