Skip to main content
PATCH
Change a site's settings

Authorizations

Authorization
string
header
required

An API key that starts with cs_sk_, created under API and MCP, API keys. A key covers every site of its workspace or a chosen list, and carries permissions per resource (Analytics, Revenue and payments, Goals and events, Funnels, Sites, Notes, Alerts) and extras (Visitor details, Raw events export, Team members, Workspace name, See API keys, Manage API keys). A change acts for the key's creator, with their current role. A request outside them answers 403 naming the missing permission.

Path Parameters

siteId
string
required

The site's id, from GET /sites.

Body

application/json
name
string

Shown in the dashboard.

Required string length: 1 - 80
domain
string

A website's domain, or an app's bundle id.

Maximum string length: 300
timezone
string

IANA timezone. Changing it rebuilds the site's daily totals in the new days.

currency
string

ISO 4217 code revenue is reported in.

Pattern: ^[A-Z]{3}$
hostnames
string[]

Extra hostnames that count as this site, such as app.example.com or *.example.com.

Maximum array length: 50
excludePaths
string[]

Paths that are never recorded, such as /admin/*.

Maximum array length: 200
Required string length: 1 - 500
allowedQueryParams
string[]

Query parameters kept on recorded URLs.

Maximum array length: 50
Pattern: ^[A-Za-z0-9_.-]{1,60}$
persistVisitors
boolean

Recognise returning visitors across days.

botFilter
enum<string>

How hard bots are filtered out of human traffic: off, standard or strict.

Available options:
off,
standard,
strict
paused
boolean

Stop recording, without deleting anything.

publicLiveCount
boolean

Let the live visitor badge show the count.

excludedHostnames
string[]

Hostnames whose traffic is never recorded, such as staging.example.com. At most 50.

Maximum array length: 60
Maximum string length: 300
excludedCountries
string[]

ISO 3166 country codes whose traffic is never recorded.

Maximum array length: 300
Maximum string length: 3
addExcludedIps
string[]

IP addresses to stop recording. Only a hash is stored; addresses are never returned.

Maximum array length: 50
Maximum string length: 64
removeExcludedIps
string[]

IP addresses to record again.

Maximum array length: 50
Maximum string length: 64

Response

Done.

site
object

One site with what its settings screens edit. Excluded addresses are never returned, only their count.