"Best analytics tool I've used in 14 years"

Update website

PUT https://datafa.st/api/v1/admin/websites/{websiteId}

Update website settings.

Request

Authentication

  • dft_ account token with settings:write.

Path parameters

ParameterTypeDescription
websiteIdstringWebsite ObjectId used by account tokens to choose which website to query or manage. Website ObjectId. The caller token must have access to this website.

Body parameters

FieldTypeRequiredDescription
domainstringNoNew website domain. Must pass domain validation.
namestringnullNo
timezonestringNoTimezone used to interpret dates and group analytics buckets. Defaults to the website timezone.
currencystringNoCurrency code for money values, such as USD or EUR.
kpistringNoGoal or metric used as the dashboard KPI.
kpiColorSchemestringNoDashboard KPI color scheme.
revenueMetricstringNoRevenue metric preference, for example revenue or mrr.
sendWeeklyReportsbooleanNoEnable or disable weekly reports.
sendViralTrafficAlertsbooleanNoEnable or disable viral traffic alerts.
isPublicDashboardEnabledbooleanNoEnable public dashboard sharing.
isPublicDataEnabledbooleanNoEnable public data access for public dashboards/widgets.
isCookielessbooleanNoEnable cookieless tracking mode.
isAttackModeEnabledbooleanNoEnable attack mode protection.
includeRenewalRevenuebooleanNoInclude renewal revenue in KPI calculations.
allowedHostnamesstring[]NoAllowed hostnames for tracking.
isAllHostnamesAllowedbooleanNoAllow tracking from all hostnames.
excludedIpsstring[]NoIP addresses excluded from tracking.
excludedPathsstring[]NoPaths excluded from tracking.
excludedCountriesstring[]NoCountries excluded from tracking.
excludedHostnamesstring[]NoHostnames excluded from tracking.

Response

Returns a JSON object with status and endpoint-specific fields.

Response fields

FieldTypeDescription
data[]._idstringWebsite ObjectId.
data[].domainstringWebsite domain.
data[].namestringnull
data[].trackingIdstringScript tracking ID.
data[].timezonestringTimezone used to interpret dates and group analytics buckets. Defaults to the website timezone.
data[].currencystringCurrency code for money values, such as USD or EUR.
data[].kpistringnull
data[].kpiColorSchemestringnull
data[].revenueMetricstringnull
data[].isCookielessbooleanWhether cookieless tracking is enabled.
data[].includeRenewalRevenuebooleanWhether renewal revenue is included in KPI calculations.
data[].allowedHostnamesstring[]Allowed hostnames.
data[].excludedIpsstring[]Excluded IPs.
data[].excludedPathsstring[]Excluded paths.
data[].excludedCountriesstring[]Excluded countries.
data[].excludedHostnamesstring[]Excluded hostnames.

Errors

Common errors include 400 for invalid input, 401 for missing or invalid tokens, 403 for missing permissions or website access, 404 for missing resources, and 500 for server errors.

✍️ Something missing? Suggest features.

🤖 AI agent or LLM? Read this page as markdown

Example request
curl -X PUT "https://datafa.st/api/v1/admin/websites/{websiteId}" \
  -H "Authorization: Bearer dft_xxx" \
  -H "Content-Type: application/json" \
  -d '{"name":"New name","timezone":"Europe/Paris","kpi":"signup"}'
Success response
{
  "status": "success",
  "data": [{
    "_id": "665f0b3c4d2e1a0012345678",
    "domain": "example.com",
    "name": "Example",
    "trackingId": "dfid_abc123",
    "timezone": "America/New_York",
    "currency": "USD",
    "kpi": "signup",
    "isCookieless": false,
    "includeRenewalRevenue": true,
    "allowedHostnames": ["example.com"],
    "excludedIps": [],
    "excludedPaths": [],
    "excludedCountries": [],
    "excludedHostnames": []
  }]
}