---
title: "Update a tracking site"
method: PATCH
path: "/v1/tracking-sites/{siteId}"
tags: ["Conversions"]
---

# Update a tracking site

`PATCH /v1/tracking-sites/{siteId}`

## Request

- Base URL: `https://zernio.com/api`
- URL: `https://zernio.com/api/v1/tracking-sites/{siteId}`
- Auth: HTTP bearer

Changes the site's name, domains, consent mode or custom subdomain. Send at least one field.

`customHostname` sets a subdomain of the site, such as `t.brand.com`; create the CNAME in `customHostname.dnsRecord`. The snippet switches to it once its status is `active`. `null` removes it.

## Request body

- object
  - `name` string
  - `domains` string[]: Hosts allowed to send events, such as `brand.com`. Events from any other origin are dropped.
  - `consentMode` 'eu_opt_in' | 'opt_in' | 'opt_out': How a visitor with no consent signal is treated. `eu_opt_in` (default): no consent in the EU, UK and other countries that require it, consent elsewhere. `opt_in`: no consent anywhere. `opt_out`: consent everywhere.
  - `customHostname` string, nullable: A subdomain of one of the site's domains, never the domain itself. `null` removes it.

## Response `200`

The updated site.

- object
  - `site` TrackingSite
    - `id` string
    - `profileId` string
    - `name` string
    - `status` 'active' | 'paused' | 'removing'
    - `install` object
      - `method` 'shopify' | 'wordpress' | 'wix' | 'webflow' | 'snippet': How the tag is installed. `snippet` means you paste it.
      - `storeAccountId` string, nullable
      - `snippet` string: The script tag to paste, already pointing at the custom subdomain once it is active.
    - `storeOrders` boolean: True when the store's orders reach Zernio from the store itself, so website purchases are forwarded but not counted twice.
    - `siteKey` string: Public key that names the site in the snippet, such as `zs_...`.
    - `domains` string[]
    - `customHostname` object, nullable
      - `hostname` string
      - `status` 'pending' | 'active' | 'failed'
      - `dnsRecord` object
        - `type` 'CNAME'
        - `name` string: The record name relative to your domain, such as `t`.
        - `target` string
    - `consentMode` 'eu_opt_in' | 'opt_in' | 'opt_out': How a visitor with no consent signal is treated. `eu_opt_in` (default): no consent in the EU, UK and other countries that require it, consent elsewhere. `opt_in`: no consent anywhere. `opt_out`: consent everywhere.
    - `checks` object[]: One per setup step: `script` for the install, then one per ad account the site sends to, keyed by its platform and ids.
      - `key` string
      - `status` 'pending' | 'passed' | 'failed'
      - `detail` string, nullable: What to do when the check has not passed.
      - `checkedAt` string, date-time
    - `setup` object
      - `status` 'pending' | 'ready' | 'failed': `failed` when any check failed, `ready` when all passed.
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key. `code` is `missing_credentials` when no Authorization header was sent and `invalid_credentials` when the key is unknown, revoked or expired.
- `404`: Resource not found
- `409`: Another site already uses this subdomain (code `custom_hostname_taken`).
- `502`: The subdomain could not be registered for now (code `provider_unavailable`). Try again.

## Changes

- **2026-11-16** `427c3183f40f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/tracking-sites/:siteId/patch.md)

---

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