Update a site
PATCH
Changes the fields sent; settings is merged into the current settings section by section (a field sent replaces that field, an array as a whole). Making the site public (settings.public: true) also needs the caller's own analytics:read on it (403 otherwise).
Requires site:update on the site (an API key, or a signed-in member's role). Share links: 401.
header
x-api-key<token>An organization API key (ak_…), with the permissions and the sites it was created with. For servers and scripts: no cookie and no Origin check. Also accepted as Authorization: Bearer ak_… (apiKeyBearer). A request carries one credential: a key sent with a share token or a live session cookie is 400 (details.reason: ambiguous_credentials).
Scope: site:update
siteId*stringapplication/json- body
name?stringLength
1 <= length <= 100domain?stringkind?stringValue in
"web""app"timezone?stringsettings?OK
application/json- response
data*|curl -X PATCH 'https://pilotfox.app/api/v1/sites/string' \ -H 'Content-Type: application/json' \ -d '{}'Example Response200
{ "data": { "id": "string", "name": "string", "domain": "string", "timezone": "string", "kind": "web", "settings": { "tracking": { "initialPageview": true, "spa": true, "hashRouting": false, "querystring": true, "outbound": true, "clicks": false, "forms": false, "copy": false, "inputs": false, "errors": false, "vitals": false, "paymentLinks": true }, "replay": { "enabled": false, "sampleRate": 100, "maskAllInputs": true, "maskTextSelector": null, "blockSelector": null, "minDurationSeconds": 0 }, "identity": { "mode": "stable" }, "privacy": { "storeQuerystringParams": "all", "stripParams": [], "respectGpc": true }, "allowedHostnames": [], "exclusions": { "ips": [], "countries": [], "paths": [], "userAgents": [], "asns": [] }, "bots": { "block": true }, "revenue": { "currency": "usd", "storeCustomerEmail": false, "attributionModel": "last_non_direct", "attributionWindowDays": 90 }, "affiliates": { "params": [ "ref" ], "windowDays": 30 }, "public": false, "primaryGoalId": null }, "createdAt": "2019-08-24T14:15:22Z", "role": "owner", "permissions": { "property1": [ "string" ], "property2": [ "string" ] } }}