Retrieve all the short links you have created.
This endpoint returns a list of all the links in your account, ordered from newest to oldest. You send a GET request (meaning you're just asking for data, not sending any). You only need your API key in the header, nothing else in the body.
/linkslyng responds with a JSON object containing a links array, a list of up to 100 of your most recently created links. Each item in the list is a link object with the following fields:
slugstringThe unique short code for this link (e.g. abc123).
shortUrlstringThe full short URL (e.g. https://lyng.my.id/abc123).
originalUrlstringThe original long URL this link points to.
clicksnumberHow many times this short link has been visited.
createdAtstringWhen this link was created, in ISO 8601 format (e.g. 2025-04-23T00:00:00.000Z). This is a standard date/time format readable by most programming languages.
Fetch your links (terminal / curl)
curl https://lyng.my.id/api/v1/links \
-H "Authorization: Bearer lk_your_key"Response
{
"links": [
{
"slug": "abc123",
"shortUrl": "https://lyng.my.id/abc123",
"originalUrl": "https://example.com",
"clicks": 42,
"createdAt": "2025-04-23T00:00:00.000Z"
},
{
"slug": "xyz789",
"shortUrl": "https://lyng.my.id/xyz789",
"originalUrl": "https://another-example.com",
"clicks": 7,
"createdAt": "2025-04-20T12:30:00.000Z"
}
]
}"links": []