Retrieve a list of URL entities.
GET /api/v1/urls
Authorization: Bearer {token}
{
"data": [
{
"id": 1,
"hash": "S8akS",
"shortUrl": "https://lnkz.at/S8akS",
"url": "https://example.com",
"clicks": 146,
"expiresAt": "2023-07-04 10:00:00",
},
{
"id": 1,
"hash": "rnMyK",
"shortUrl": "https://lnkz.at/rnMyK",
"url": "https://google.com",
"clicks": 755,
"expiresAt": "2023-12-12 13:30:00",
}
]
}
200
Retrieve information about a specific URL entity.
GET /api/v1/urls/{id}
Authorization: Bearer {token}
{
"data": {
"id": 1,
"hash": "S8akS",
"shortUrl": "https://lnkz.at/S8akS",
"url": "https://example.com",
"clicks": 146,
"expiresAt": "2023-07-04 10:00:00",
}
}
200
Create a new URL entity.
Field "expiresAt" is optional.
Freemium gating may return plan/quota errors for FREE users.
POST /api/v1/urls
Authorization: Bearer {token}
Content-Type: application/json
{
"url": "https://www.youtube.com",
"expiresAt": "2025-12-31 23:59:59"
}
{
"data": {
"id": 3,
"hash": "2zKwy",
"shortUrl": "https://lnkz.at/2zKwy",
"url": "https://www.youtube.com",
"clicks": null,
"expiresAt": "2025-12-31T23:59:59.000000Z"
}
}
201
{
"code": "PLAN_QUOTA_EXCEEDED",
"message": "You reached your link limit for the current plan.",
"current_plan": "free",
"quota_key": "max_links",
"policy_limit": 100,
"current_usage": 100,
"upgrade_hint": "Upgrade to PRO to unlock this capability."
}
Create multiple URL entities in a single request.
Field "expiresAt" is optional for each item.
POST /api/v1/urls/bulk
Authorization: Bearer {token}
Content-Type: application/json
[
{
"url": "https://laravel.com",
"expiresAt": "2025-12-31 23:59:59"
},
{
"url": "https://filamentphp.com",
"expiresAt": null
}
]
{
"data": [
{
"id": 4,
"hash": "A1b2C",
"shortUrl": "https://lnkz.at/A1b2C",
"url": "https://laravel.com",
"clicks": null,
"expiresAt": "2025-12-31T23:59:59.000000Z"
},
{
"id": 5,
"hash": "D3e4F",
"shortUrl": "https://lnkz.at/D3e4F",
"url": "https://filamentphp.com",
"clicks": null,
"expiresAt": null
}
]
}
201
Update an existing URL entity.
Field "expiresAt" can be null.
PUT /api/v1/urls/{id}
Authorization: Bearer {token}
Content-Type: application/json
{
"url": "https://example.com",
"expiresAt": "2025-12-31 23:59:59"
}
empty
200
Delete an existing URL entity.
DELETE /api/v1/urls/{id}
Authorization: Bearer {token}
Empty
204