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

# Update Tracking Settings

> Update the company's account-wide email tracking defaults

Update how a company measures email engagement: open, click, and unsubscribe tracking, the default attribution window, and automatic UTM tagging.

Changes apply to every campaign, sequence, and transactional email sent afterwards. Already-sent emails keep the links and pixels they were rendered with.

Provide at least one field. Reply tracking (`replyTrackingEnabled`, `replyTrackingDomainMode`, `forwardReplies`) is updated through [Update Company](/api-reference/companies/update), and the dedicated click-tracking domain is configured in the dashboard.

Requires the `companies:manage` scope.

## Request

<ParamField body="openTrackingEnabled" type="boolean">
  Whether to embed the open-tracking pixel. Turning this off also stops open
  rates from being recorded.
</ParamField>

<ParamField body="clickTrackingEnabled" type="boolean">
  Whether to rewrite links through the click-tracking redirect. Turning this off
  stops click rates and click-based automation triggers.
</ParamField>

<ParamField body="strictBotFilteringEnabled" type="boolean">
  Opt-in aggressive bot detection: strict user-agent patterns, datacenter-IP
  classification, and cross-send IP sweeps. Off by default. Enabling it filters
  more security-scanner traffic but can also discard some real engagement,
  lowering reported open and click rates.
</ParamField>

<ParamField body="unsubscribeTrackingEnabled" type="boolean">
  Whether unsubscribe links are attributed to the email that produced them.
  Unsubscribe links keep working either way.
</ParamField>

<ParamField body="defaultAttributionWindowHours" type="integer">
  Default revenue attribution window in hours, between 1 and 720.
</ParamField>

<ParamField body="autoUtmEnabled" type="boolean">
  Whether UTM parameters are appended to outbound links automatically. Enabling
  this when no parameters are stored seeds the platform defaults.
</ParamField>

<ParamField body="autoUtmSettings" type="object">
  UTM templates - `source`, `medium`, `campaign`, `content`, `term` - merged
  over the stored ones. Values support placeholders such as
  `{{email.subject}}` and `{{link.text}}`. Set a field to `null` to stop
  emitting that parameter, or send `null` for the whole object to reset every
  parameter to the platform defaults.
</ParamField>

```bash theme={null}
curl -X PATCH "https://api.sequenzy.com/api/v1/tracking-settings" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"openTrackingEnabled": false, "clickTrackingEnabled": false}'
```

## Responses

The full tracking configuration is returned after the update, in the same shape as [Get Tracking Settings](/api-reference/tracking-settings/get).

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Updated tracking settings: openTrackingEnabled, clickTrackingEnabled.",
    "tracking": {
      "openTrackingEnabled": false,
      "clickTrackingEnabled": false,
      "strictBotFilteringEnabled": false,
      "unsubscribeTrackingEnabled": true,
      "defaultAttributionWindowHours": 24
    },
    "autoUtm": {
      "enabled": false,
      "settings": {}
    },
    "trackingDomain": null,
    "replyTracking": {
      "inboundEmailEnabled": true,
      "inboundReplyDomainMode": "sequenzy",
      "forwardReplies": true
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "defaultAttributionWindowHours must be a whole number between 1 and 720."
  }
  ```

  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized"
  }
  ```

  ```json 403 theme={null}
  {
    "success": false,
    "error": "API key is missing required scope: companies:manage"
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "error": "Company not found"
  }
  ```
</ResponseExample>
