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

# Update Link Status

> Activate, pause, or archive your dynamic links

## Overview

Change the status of your dynamic links to control their availability and behavior. You can activate, pause, or archive links to manage your campaigns effectively without losing analytics data.

## Endpoint

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

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

## Parameters

For detailed information about path and request parameters, see the [Update Link Status API Reference](/api-reference/links/update-status).

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.bit2connect.com/1.0/links/summer-sale/status" \
    -H "X-API-KEY: b2co_your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "status": "PAUSED"
    }'
  ```

  ```javascript JavaScript theme={null}
  const code = "summer-sale";
  const response = await fetch(
    `https://api.bit2connect.com/1.0/links/${code}/status`,
    {
      method: "PATCH",
      headers: {
        "X-API-KEY": "b2co_your_api_key_here",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        status: "PAUSED",
      }),
    }
  );

  const data = await response.json();
  console.log("Link status updated:", data.data.status);
  ```

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

  code = "summer-sale"
  url = f"https://api.bit2connect.com/1.0/links/{code}/status"
  headers = {
      "X-API-KEY": "b2co_your_api_key_here",
      "Content-Type": "application/json"
  }

  payload = {
      "status": "PAUSED"
  }

  response = requests.patch(url, json=payload, headers=headers)
  data = response.json()

  print(f"Status updated to: {data['data']['status']}")
  ```
</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": "PAUSED",
    "qrCode": "https://b2co.link/summer-sale/qr",
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T11:45:00Z",
    "expiresAt": "2024-12-31T23:59:59Z",
    "clickCount": 127
  },
  "timestamp": "2024-01-15T11:45:00Z"
}
```

### Error Response

```json theme={null}
{
  "success": false,
  "error": {
    "code": "LINK_NOT_FOUND",
    "message": "Link with the specified code was not found"
  }
}
```

For detailed response fields, error codes, status behavior, and use cases, see the [Update Link Status API Reference](/api-reference/links/update-status).

## Next Steps

<CardGroup cols={2}>
  <Card title="Get Link Details" icon="eye" href="/guides/get-link">
    View the updated link status and configuration
  </Card>

  <Card title="List Links" icon="list" href="/guides/list-links">
    Filter links by status to manage your campaigns
  </Card>

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

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