Skip to main content
Retrieve all short links that the authenticated user has created or has access to through teams.

Endpoint

GET /api/links

Headers

Authorization
string
required
Bearer token for authentication

Query Parameters

page
number
Page number for pagination (default: 1)
pageSize
number
Number of results per page
Search term to filter links by name or URL

Response

data
array
Array of link objects
count
number
Total number of links
page
number
Current page number
pageSize
number
Results per page

Example Request

curl "https://your-umami-instance.com/api/links?page=1&pageSize=20" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Product Launch",
      "url": "https://example.com/product-launch",
      "slug": "launch2024",
      "userId": "660e8400-e29b-41d4-a716-446655440001",
      "teamId": null,
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T10:30:00.000Z"
    },
    {
      "id": "770e8400-e29b-41d4-a716-446655440002",
      "name": "Marketing Campaign",
      "url": "https://example.com/campaign",
      "slug": "campaign-q1",
      "userId": null,
      "teamId": "880e8400-e29b-41d4-a716-446655440003",
      "createdAt": "2024-02-20T14:45:00.000Z",
      "updatedAt": "2024-02-20T14:45:00.000Z"
    }
  ],
  "count": 2,
  "page": 1,
  "pageSize": 20
}
Short links provide URL shortening with integrated analytics tracking.

Build docs developers (and LLMs) love