Verified by the sovseal team

POST /telemetry

Submit opt-in aggregate-only usage telemetry.

This endpoint accepts client-side usage statistics rollups. It enforces a strict aggregate-only whitelist to ensure no cleartext memory contents or PII can ever be sent to the database.

Session JWT Required

This endpoint requires a Supabase user session JWT.


1. Submit Telemetry Report

Push a daily rollup of numeric counters to the platform.

Request URL

POST /telemetry

Request Body Schema

The request must contain only the following whitelist fields. Extra fields are rejected immediately to protect privacy.

FieldTypeRequiredDescription
memory_countintegerNoCurrent count of stored memories (must be $\ge 0$).
device_countintegerNoNumber of active syncing devices (must be $\ge 0$).
bytes_storedintegerNoTotal size of local database files in bytes (must be $\ge 0$).
sync_opsintegerNoNumber of synchronization actions completed in this window (must be $\ge 0$).
window_startstringNoISO-8601 timestamp for the start of the daily rollup window.

Example Request Body

{
  "memory_count": 1240,
  "device_count": 2,
  "bytes_stored": 8104820,
  "sync_ops": 420,
  "window_start": "2026-06-09T00:00:00.000Z"
}

Processing Gates

  1. Opt-In Enforcement: The server retrieves the user's dashboard settings. If telemetry_opt_in is not explicitly set to true, the write is rejected with 403 telemetry_disabled.
  2. Strict Whitelisting: If the request contains any keys outside the whitelist (e.g. memory_contents, metadata), the request is rejected with 400 non_aggregate_field.
  3. Postgres Upsert: Statistics are upserted into the database. A unique constraint on (user_id, window_start) aggregates inputs to a single row per day.

Response Schema (201 Created)

{
  "aggregate": {
    "user_id": "0x123456789...",
    "window_start": "2026-06-09T00:00:00.000Z",
    "memory_count": 1240,
    "device_count": 2,
    "bytes_stored": 8104820,
    "sync_ops": 420,
    "reported_at": "2026-06-09T16:45:30.123Z"
  }
}

On this page