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

# Delete Link

> Permanently delete a dynamic link and remove it from your project

## 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 delete
</ParamField>

## Response

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

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

<ResponseField name="data.message" type="string">
  Confirmation message about the deletion
</ResponseField>

<ResponseField name="data.id" type="string">
  Unique identifier of the deleted link
</ResponseField>

<ResponseField name="data.code" type="string">
  Short code of the deleted link
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "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', {
    method: 'DELETE',
    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.delete(url, headers=headers)
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "data": {
      "message": "Link deleted successfully",
      "id": "clp123abc456",
      "code": "summer-sale"
    }
  }
  ```

  ```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 or belongs to another project
</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 permission to delete this link
</ResponseField>

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