Short Links
Manage your short links — create, retrieve, update, and delete.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/client/short-links | List all short links |
POST | /v1/client/short-links | Create a short link |
GET | /v1/client/short-links/{short_code} | Get a short link |
PUT | /v1/client/short-links/{short_code} | Update a short link |
DELETE | /v1/client/short-links/{short_code} | Delete a short link |
List Short Links
Returns a paginated list of short links belonging to the authenticated user.
GET /client/short-linksQuery parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
per_page | integer | 10 | Items per page |
sort_column | string | created_at | Column to sort by |
sort_type | string | desc | Sort direction: asc or desc |
Example request
curl "https://api.linx.ly/v1/client/short-links?page=1&per_page=10&sort_column=created_at&sort_type=desc" \
-H "Authorization: Bearer your_access_token_here" \
-H "Accept: application/json"Response 200 OK
{
"data": [
{
"id": 45,
"utm_id": null,
"short_code": "a7b8c9d",
"status": true,
"destination_url": "https://google.com",
"created_at": "2026-06-04 12:20:00",
"clicks_count": 0,
"utm": null
}
],
"links": {
"first": "https://api.linx.ly/v1/client/short-links?page=1",
"last": "https://api.linx.ly/v1/client/short-links?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{ "url": null, "label": "« Previous", "active": false },
{ "url": "https://api.linx.ly/v1/client/short-links?page=1", "label": "1", "active": true },
{ "url": null, "label": "Next »", "active": false }
],
"path": "https://api.linx.ly/v1/client/short-links",
"per_page": 10,
"to": 1,
"total": 1
}
}Short link object fields
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier |
short_code | string | The short code used in the URL |
status | boolean | Whether the link is active |
destination_url | string | The URL the short link redirects to |
clicks_count | integer | Total number of clicks |
utm_id | integer | null | Associated UTM config ID, if any |
utm | object | null | UTM parameters, if configured |
created_at | string | ISO 8601 creation timestamp |
Create Short Link
Creates a new short link. The short code can be auto-generated or custom.
POST /client/short-linksRequest body
| Field | Type | Description |
|---|---|---|
destination_url | string | The destination URL to redirect to |
short_code | string | Custom short code. Omit to auto-generate. |
Auto-generated short code
Omit short_code to let the API generate a random code.
curl -X POST https://api.linx.ly/v1/client/short-links \
-H "Authorization: Bearer your_access_token_here" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"destination_url": "https://google.com"}'Response 200 OK
{
"data": {
"id": 45,
"short_code": "a7b8c9d",
"destination_url": "https://google.com",
"user_id": 12,
"created_at": "2026-06-04 12:20:00",
"updated_at": "2026-06-04 12:20:00",
"utm": null,
"schedules": []
}
}Error responses
| Code | Reason |
|---|---|
400 | Tariff limit reached |
401 | Invalid or missing token |
422 | Short code already taken (custom code only) |
See Error Codes for response bodies.
Get Short Link
Returns details of a specific short link by its short code.
GET /client/short-links/{short_code}Path parameters
| Parameter | Type | Description |
|---|---|---|
short_code | string | The short code of the link |
Example request
curl https://api.linx.ly/v1/client/short-links/mycustom \
-H "Authorization: Bearer your_access_token_here" \
-H "Accept: application/json"Response 200 OK
{
"data": {
"id": 46,
"short_code": "mycustom",
"destination_url": "https://google.com",
"user_id": 12,
"created_at": "2026-06-04 12:20:00",
"updated_at": "2026-06-04 12:20:00",
"utm": null,
"schedules": []
}
}Error responses
404 — resource not found. See Error Codes.
Update Short Link
Updates the destination URL or other metadata of an existing short link.
PUT /client/short-links/{short_code}Path parameters
| Parameter | Type | Description |
|---|---|---|
short_code | string | The short code of the link to update |
Request body
| Field | Type | Description |
|---|---|---|
destination_url | string | New destination URL |
Example request
curl -X PUT https://api.linx.ly/v1/client/short-links/mycustom \
-H "Authorization: Bearer your_access_token_here" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"destination_url": "https://github.com"}'Response 200 OK
{
"data": {
"id": 46,
"short_code": "mycustom",
"destination_url": "https://github.com",
"user_id": 12,
"created_at": "2026-06-04 12:20:00",
"updated_at": "2026-06-04 12:25:00",
"utm": null,
"schedules": []
}
}Error responses
422 — plan does not allow editing destination URL. See Error Codes.
Delete Short Link
Permanently deletes a short link along with its click logs and schedules.
DELETE /client/short-links/{short_code}Path parameters
| Parameter | Type | Description |
|---|---|---|
short_code | string | The short code of the link to delete |
Example request
curl -X DELETE https://api.linx.ly/v1/client/short-links/mycustom \
-H "Authorization: Bearer your_access_token_here" \
-H "Accept: application/json"Response 200 OK
{
"message": "Short link deleted successfully."
}🚫
Deletion is permanent. Click logs and schedule data associated with the link are also removed and cannot be recovered.