---
title: "Update Workspace Conversion Tracking Settings"
method: POST
path: "/workspaces/{workspace_id}/conversion-tracking"
tags: ["Workspaces"]
---

# Update Workspace Conversion Tracking Settings

`POST /workspaces/{workspace_id}/conversion-tracking`

## Request

- Base URL: `https://api.rebrandly.com/v1`
- URL: `https://api.rebrandly.com/v1/workspaces/{workspace_id}/conversion-tracking`
- Auth: API key in header `apikey`

Enable or disable conversion tracking and configure the attribution window for a workspace.

**Requires Feature:** `extra.conversion_tracking`

**Behavior:**
- When `enabled=true`: Activates conversion tracking. If `attributionWindow` is not provided,
  defaults to 30 days.
- When `enabled=false`: Disables conversion tracking. The `attributionWindow` is preserved
  (from body if provided, otherwise from the previous DB value, otherwise `null`).

## Path parameters

- `workspace_id` string, required

## Headers

- `apikey` string, required

## Request body

- object
  - `enabled` boolean, required: Whether conversion tracking is enabled for this workspace
  - `attributionWindow` integer: Attribution window in days. Defaults to 30 when enabling without specifying a value. When disabling, the previous value is preserved (from DB if not provided in body).

## Response `200`

Updated conversion tracking settings

- ConversionTrackingSettings
  - `enabled` boolean, required: Whether conversion tracking is enabled for this workspace
  - `attributionWindow` integer, nullable: Attribution window in days. `null` when conversion tracking is not configured or disabled. Defaults to 30 when enabled without specifying a value.
  - `apiKeyCreatedByOwner` boolean, nullable: Whether the workspace Owner has created a conversion tracking API key. API keys are account-level resources always created by the account they belong to, so existence implies the Owner created it. The key value itself is never exposed. On the dedicated `/workspaces/{workspace_id}/conversion-tracking` endpoint this is always a boolean (the endpoint is restricted to owner/admin). On the workspaces list (`include=conversionTracking`) it is a boolean for workspaces where the caller has the `owner` or `admin` role, and `null` for lower roles (the field is always present).

## Other responses

- `403`: Feature not available or validation error. - `FeatureNotIncluded`: `extra.conversion_tracking` not available on account plan - `InvalidFormat`: Request body validation failed (e.g., `enabled` not boolean, `attributionWindow` out of range)
- `404`: Workspace not found or insufficient permissions (not owner/admin)

---

[API](https://skmtc.dev/rebrandly/apis/rebrandly-api.md) - [All operations](https://skmtc.dev/rebrandly/apis/rebrandly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rebrandly/apis/rebrandly-api/revisions/b098bf9fb684?raw)
