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

# Update Link

> Update an existing link

## Path Parameters

<ParamField path="linkId" type="string" required>
  The unique link identifier
</ParamField>

## Request Body

<ParamField body="destinationUrl" type="string">
  New target URL
</ParamField>

<ParamField body="title" type="string">
  New display name
</ParamField>

<ParamField body="enabled" type="boolean">
  Enable or disable the link
</ParamField>

<ParamField body="expiresAt" type="string">
  New expiration datetime (ISO 8601)
</ParamField>

<ParamField body="clicksLimit" type="number">
  New click limit (null to remove)
</ParamField>

<ParamField body="password" type="string">
  New password (empty string to remove)
</ParamField>

<ParamField body="tags" type="array">
  Replace tags with new array
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.linquid.io/api/links/link_abc123 \
    -H "X-API-Key: lw_your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "title": "Updated Title",
      "enabled": true,
      "tags": ["winter", "sale"]
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.linquid.io/api/links/link_abc123', {
    method: 'PATCH',
    headers: {
      'X-API-Key': 'lw_your_api_key_here',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      title: 'Updated Title',
      enabled: true,
      tags: ['winter', 'sale'],
    }),
  });
  ```

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

  response = requests.patch(
      'https://api.linquid.io/api/links/link_abc123',
      headers={
          'X-API-Key': 'lw_your_api_key_here',
          'Content-Type': 'application/json',
      },
      json={
          'title': 'Updated Title',
          'enabled': True,
          'tags': ['winter', 'sale'],
      }
  )
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "id": "link_abc123",
      "shortCode": "abc123",
      "shortUrl": "https://linqu.id/abc123",
      "destinationUrl": "https://example.com/landing",
      "title": "Updated Title",
      "enabled": true,
      "tags": ["winter", "sale"],
      "updatedAt": "2024-01-15T16:00:00.000Z"
    }
  }
  ```
</ResponseExample>
