> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linquid.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Links

> List workspace links with pagination, sorting, archive filtering, and click stats

## Query Parameters

<ParamField query="page" type="number" default="1">
  Page index
</ParamField>

<ParamField query="limit" type="number" default="20">
  Page size (`1..100`)
</ParamField>

<ParamField query="sortBy" type="string" default="createdAt">
  Sort field
</ParamField>

<ParamField query="sortOrder" type="string" default="desc">
  `asc` or `desc`
</ParamField>

<ParamField query="archived" type="boolean" default="false">
  `true` returns archived links only, `false` returns active links
</ParamField>

## Access

* Permission: `links:read`

Behavior:

* Response includes computed `shortUrl`.
* Click/unique-click counters are populated from analytics stream when available.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.linquid.io/api/links?page=1&limit=20&sortBy=createdAt&sortOrder=desc&archived=false" \
    -H "Authorization: Bearer <token>"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": [
      {
        "id": "link_abc123",
        "shortCode": "abc123",
        "shortUrl": "https://linqu.id/abc123",
        "title": "Launch Link",
        "destinationUrl": "https://example.com/launch",
        "campaignId": "campaign_123",
        "archived": false,
        "clicks": 104,
        "uniqueClicks": 91
      }
    ],
    "meta": {
      "page": 1,
      "limit": 20,
      "sortBy": "createdAt",
      "sortOrder": "desc"
    }
  }
  ```
</ResponseExample>
