---
title: "Turn anonymous telemetry on or off"
method: PATCH
path: "/settings/telemetry"
tags: ["Telemetry"]
---

# Turn anonymous telemetry on or off

`PATCH /settings/telemetry`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/settings/telemetry`
- Auth: HTTP bearer

Instance admins only. Persisted in the settings row, audit-logged as
`TELEMETRY_SETTING_UPDATED`, and applied without a restart. When
`TEMPS_TELEMETRY` forces telemetry off, the choice is still saved but has
no effect until the variable is removed; the response says so via
`source = environment`.

## Request body

- UpdateTelemetrySettingsRequest: Turn anonymous telemetry on or off.
  - `enabled` boolean, required

## Response `200`

Setting saved; returns the new state

- TelemetryStatusResponse: Current anonymous telemetry state and disclosure.
  - `admin_preference` boolean, nullable: The admin's stored choice; `null` when nobody has chosen yet.
  - `anonymous_id` string, nullable: Random identifier events are reported under. Not derived from the host, domain or any account. `null` if the reporter could not start.
  - `can_manage` boolean, required: Whether the caller may change the setting (instance admins only).
  - `default_enabled` boolean, required: The built-in default that applies when nobody has chosen.
  - `enabled` boolean, required: Whether this server is sending anonymous telemetry right now.
  - `endpoint_host` string, nullable: Host events are sent to.
  - `env_opted_out` boolean, required: `TEMPS_TELEMETRY` forces telemetry off on this server. The console cannot override it; remove the variable and restart to change.
  - `env_var` string, required: Name of the environment variable that forces telemetry off.
  - `events` TelemetryEventInfo[], required: Every event this binary can send.
    - `category` 'instance' | 'deployments' | 'projects' | 'git' | 'domains' | 'services' | 'feature_activation' | 'ai' | 'configuration' | 'health', required: Area an event belongs to, for operator-facing disclosure (see [`TelemetryEventKind::category`]). Serialized as snake_case.
    - `name` string, required: Wire name, e.g. `deploy_succeeded`.
  - `privacy_doc_url` string, required: Documentation of what is collected and what is never collected.
  - `source` 'environment' | 'admin_setting' | 'default' | 'unavailable', required: What decided `enabled`.
  - `temps_version` string, nullable: Version string stamped on every event.

## Other responses

- `400`: Invalid request body
- `401`: Unauthorized
- `403`: Instance admin required
- `500`: Setting could not be saved

## Changes

- **2026-11-09** `12896146b193`: 4 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
  - removed the required property `extensions` from the response with the `500` status
- **2026-10-05** `ba210f51e462`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/settings/telemetry/patch.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
