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

# List Dynamic Links

> Retrieve and manage all your dynamic links with pagination and filtering

## Overview

Retrieve a paginated list of all dynamic links in your project. This endpoint supports filtering by status, searching by name or code, and sorting options to help you manage large collections of links efficiently.

## Endpoint

<CodeGroup>
  ```bash Public API theme={null}
  GET https://api.bit2connect.com/1.0/links
  ```

  ```bash Headers Required theme={null}
  X-API-KEY: b2co_your_api_key_here
  ```
</CodeGroup>

## Query Parameters

For detailed information about all query parameters and filtering options, see the [List Links API Reference](/api-reference/links/list).

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.bit2connect.com/1.0/links?page=1&limit=10&status=active&search=campaign" \
    -H "X-API-KEY: b2co_your_api_key_here"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.bit2connect.com/1.0/links?page=1&limit=10&status=active&search=campaign",
    {
      headers: {
        "X-API-KEY": "b2co_your_api_key_here",
      },
    }
  );

  const data = await response.json();
  console.log("Links:", data.data);
  console.log("Total:", data.pagination.total);
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.bit2connect.com/1.0/links"
  headers = {
      "X-API-KEY": "b2co_your_api_key_here"
  }

  params = {
      "page": 1,
      "limit": 10,
      "status": "active",
      "search": "campaign"
  }

  response = requests.get(url, headers=headers, params=params)
  data = response.json()

  print(f"Found {data['pagination']['total']} links")
  for link in data['data']:
      print(f"- {link['name']}: {link['shortUrl']}")
  ```
</CodeGroup>

## Response

### Success Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "clp123abc456",
      "code": "summer-sale",
      "shortUrl": "https://b2co.link/summer-sale",
      "originalUrl": "https://example.com/products/summer-sale",
      "name": "Summer Sale Campaign",
      "status": "ACTIVE",
      "qrCode": "https://b2co.link/summer-sale/qr",
      "createdAt": "2024-01-15T10:30:00Z",
      "expiresAt": "2024-12-31T23:59:59Z",
      "clickCount": 127
    },
    {
      "id": "clp789def012",
      "code": "winter-promo",
      "shortUrl": "https://b2co.link/winter-promo",
      "originalUrl": "https://example.com/products/winter-promo",
      "name": "Winter Promotion",
      "status": "ACTIVE",
      "qrCode": "https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://b2co.link/winter-promo",
      "createdAt": "2024-01-10T14:20:00Z",
      "expiresAt": null,
      "clickCount": 89
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 25,
    "totalPages": 3
  },
  "timestamp": "2024-01-15T10:30:00Z"
}
```

### Error Response

```json theme={null}
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMETERS",
    "message": "Invalid page number or limit"
  }
}
```

For detailed response fields, error codes, and filtering examples, see the [List Links API Reference](/api-reference/links/list).

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Link" icon="plus" href="/guides/create-link">
    Create new dynamic links for your campaigns
  </Card>

  <Card title="Get Link Details" icon="eye" href="/guides/get-link">
    Fetch detailed information about a specific link
  </Card>

  <Card title="Update Link Status" icon="toggle-on" href="/guides/update-link-status">
    Activate, pause, or archive your links
  </Card>

  <Card title="Delete Link" icon="trash" href="/guides/delete-link">
    Permanently remove links from your project
  </Card>
</CardGroup>
