> ## 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.

# Get Link

> Retrieve detailed information about a specific dynamic link by its code

## Request

<ParamField header="X-API-KEY" type="string" required>
  Your project API key: `b2co_your_api_key`
</ParamField>

<ParamField path="code" type="string" required>
  The unique short code of the link to retrieve
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  The link object with detailed information
</ResponseField>

<ResponseField name="data.code" type="string">
  Unique short code for the link
</ResponseField>

<ResponseField name="data.name" type="string">
  Display name of the link
</ResponseField>

<ResponseField name="data.clickCount" type="number">
  Total number of clicks on this link
</ResponseField>

<ResponseField name="data.shortLink" type="string">
  Complete short URL (e.g., [https://b2co.link/abc123](https://b2co.link/abc123))
</ResponseField>

<ResponseField name="data.previewLink" type="string">
  The original destination URL
</ResponseField>

<ResponseField name="data.name" type="string">
  Display name of the link
</ResponseField>

<ResponseField name="data.status" type="string">
  Link status: ACTIVE, PAUSED, EXPIRED, or DELETED
</ResponseField>

<ResponseField name="data.qrCode" type="string">
  QR code URL for the link
</ResponseField>

<ResponseField name="data.createdAt" type="string">
  ISO 8601 timestamp when created
</ResponseField>

<ResponseField name="data.expiresAt" type="string">
  ISO 8601 timestamp when expires (if set)
</ResponseField>

<ResponseField name="data.clickCount" type="number">
  Total number of clicks on this link
</ResponseField>

<ResponseField name="data.payload" type="object">
  Complete link configuration payload with platform-specific settings
</ResponseField>

<ResponseField name="data.projectId" type="string">
  ID of the project this link belongs to
</ResponseField>

<ResponseField name="data.createdBy" type="string">
  ID of the user who created the link
</ResponseField>

<ResponseField name="data.updatedAt" type="string">
  ISO 8601 timestamp when last updated
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.bit2connect.com/1.0/links/summer-sale" \
    -H "X-API-KEY: b2co_your_api_key"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.bit2connect.com/1.0/links/summer-sale",
    {
      headers: {
        "X-API-KEY": "b2co_your_api_key",
      },
    }
  );

  const data = await response.json();
  ```

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

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

  response = requests.get(url, headers=headers)
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "data": {
      "id": "clp123abc456",
      "code": "summer-sale",
      "shortUrl": "https://b2co.link/summer-sale",
      "originalUrl": "https://yourapp.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": 1247,
      "payload": {
        "link": "https://yourapp.com/products/summer-sale",
        "android": {
          "package": "com.yourapp.android",
          "store_fallback": "https://play.google.com/store/apps/details?id=com.yourapp.android"
        },
        "ios": {
          "bundleId": "com.yourapp.ios",
          "app_store_fallback": "https://apps.apple.com/app/yourapp/id123456789"
        },
        "social": {
          "title": "Summer Sale - Up to 50% Off!",
          "description": "Don't miss our biggest sale of the year",
          "image": "https://yourapp.com/images/summer-sale.jpg"
        },
        "campaign": {
          "utm_source": "api",
          "utm_medium": "dynamic_link",
          "utm_campaign": "summer_sale_2024"
        }
      },
      "projectId": "proj_abc123",
      "createdBy": "user_xyz789",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  }
  ```

  ```json Error Response theme={null}
  {
    "success": false,
    "error": {
      "code": "LINK_NOT_FOUND",
      "message": "Link with code 'summer-sale' not found"
    }
  }
  ```
</ResponseExample>

## Error Codes

<ResponseField name="LINK_NOT_FOUND" type="string">
  Link with the specified code does not exist
</ResponseField>

<ResponseField name="INVALID_API_KEY" type="string">
  API key is missing or invalid
</ResponseField>

<ResponseField name="INSUFFICIENT_PERMISSIONS" type="string">
  API key does not have access to this link
</ResponseField>

<ResponseField name="RATE_LIMIT_EXCEEDED" type="string">
  Too many requests, please try again later
</ResponseField>
