Log in
URL shortener
API documentation
To utilize our API, you need to register and generate an authentication token.

Get URL List

Retrieve a list of URL entities.

Request

GET /api/v1/urls
Authorization: Bearer {token}

Response

{
    "data": [
        {
            "id": 1,
            "hash": "S8akS",
            "shortUrl": "http://lnkz.at/S8akS",
            "url": "https://example.com",
            "clicks": 146,
            "expiresAt": "2023-07-04 10:00:00",
        },
        {
            "id": 1,
            "hash": "rnMyK",
            "shortUrl": "http://lnkz.at/rnMyK",
            "url": "https://google.com",
            "clicks": 755,
            "expiresAt": "2023-12-12 13:30:00",
        }
    ]
}

Response Code

200

Get URL Entity

Retrieve information about a specific URL entity.

Request

GET /api/v1/urls/{id}
Authorization: Bearer {token}

Response

{
    "data": {
        "id": 1,
        "hash": "S8akS",
        "shortUrl": "http://lnkz.at/S8akS",
        "url": "https://example.com",
        "clicks": 146,
        "expiresAt": "2023-07-04 10:00:00",
    }
}

Response Code

200

Create URL Entity

Create a new URL entity.

Field "expiresAt" is optional.

Request

POST /api/url
Authorization: Bearer {token}
Content-Type: application/json

{
    "url": "https://www.youtube.com",
    "expiresAt": "2025-12-31 23:59:59"
}

Response

{
    "data": {
        "id": 3,
        "hash": "2zKwy",
        "shortUrl": "http://lnkz.at/2zKwy",
        "url": "https://www.youtube.com",
        "clicks": null,
        "expiresAt": "2025-12-31T23:59:59.000000Z"
    }
}

Response Code

201

Update URL Entity

Update an existing URL entity.

Field "expiresAt" can be null.

Request

PUT /api/v1/urls/{id}
Authorization: Bearer {token}
Content-Type: application/json

{
    "url": "https://example.com",
    "expiresAt": "2025-12-31 23:59:59"
}

Response

empty

Response Code

200

Delete URL Entity

Delete an existing URL entity.

Request

DELETE /api/v1/urls/{id}
Authorization: Bearer {token}

Response

Empty

Response Code

204
Transform lengthy and unattractive links into appealing, memorable, and traceable short URLs with our free URL Shortener. Easily shorten links for social media platforms, blogs, SMS, emails, advertisements, and virtually any other place where you wish to distribute them. Whether it's Twitter, Facebook, YouTube, Instagram, WhatsApp, emails, SMS, or videos, our service covers it all. lnkz.at stands out as the superior free alternative to standard URL shorteners such as bitly and tinyurl.