> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squasher.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Privacy and data handling

> Learn which data the Squasher SDKs send, which values Squasher masks, what AI triage reads, and what account deletion removes.

## What Data Is Collected

| Data                                           | Source                                                                          | Purpose                                             |
| ---------------------------------------------- | ------------------------------------------------------------------------------- | --------------------------------------------------- |
| Error message + stack trace                    | SDK / log drain                                                                 | Grouping, triage, display                           |
| Request URL, method, and headers               | SDK (if provided)                                                               | Debugging context                                   |
| User context (id, email, username, IP address) | SDK (`setUser()`)                                                               | Identifying affected users                          |
| Breadcrumbs                                    | Sent by Squasher SDKs, but not stored today (Sentry SDK breadcrumbs are stored) | None today for Squasher SDKs                        |
| Session replay recordings                      | Browser SDK (on by default)                                                     | Replay of the user session                          |
| Environment + release                          | SDK config                                                                      | Filtering                                           |
| Source maps                                    | CLI or API upload                                                               | Stored per release; not applied to stack traces yet |

The browser SDK records breadcrumbs automatically for page navigation, clicks, failed `fetch`
responses, and `console.error` / `console.warn` calls, and sends them with events. Squasher does not
store breadcrumbs from Squasher SDKs today. Set `enableAutoBreadcrumbs: false` to stop the SDK from
recording them. Set `replay: { enabled: false }` to stop session replay, or
`replay: { privacy: { maskAllText: true } }` to mask all page text and typed input. See
[Session replay](/features/session-replay).

## PII Scrubbing

Squasher masks some secret values automatically:

* For SDK events sent to `https://ingest.squasher.ai`, Squasher replaces the value of each
  `attributes` or `extra` key that contains `authorization`, `cookie`, `password`, `secret`,
  `token`, or `api_key` as a separate part of the key name (for example `password` or
  `auth.token`) with `[REDACTED]`.
* `withHttpRequest()` in the Node SDK removes the query string from the request URL. It also
  masks each header whose name contains a word such as `authorization`, `cookie`, `token`,
  `secret`, or `password`, and it masks bearer tokens, JWTs, API keys, and email addresses in
  other header values.

Squasher does not remove personal data from user context, tags, or error messages. Use
`beforeSend` to change or drop an event before the SDK sends it. The Node, browser, and edge
SDKs accept `beforeSend: (event) => event | null`. Return `null` to drop the event.

```typescript theme={null}
import { init } from "@squasher-ai/node";

init({
  apiKey: process.env.SQUASHER_API_KEY!,
  projectId: process.env.SQUASHER_PROJECT_ID!,
  beforeSend: (event) => {
    if (event.user) {
      delete event.user.email;
      delete event.user.ip_address;
    }
    return event;
  },
});
```

## Data Retention

Retention depends on the plan and the data type. See [Retention](/features/plans-and-billing#retention) and the organization **Billing** page in your dashboard for the current values.

## AI Triage & Your Data

When AI triage runs, the model reads the error group summary: error type, title, level,
environment, service, event count, first and last seen times, and status. Triage does not read
individual events, so user context, request data, and breadcrumbs are not sent to the model.
Squasher sends the title without changes. Do not put personal data in error messages, or
remove it with `beforeSend`.

## Deleting Your Data

Delete your account from **Account > Delete account** in the dashboard. Type your account email
to confirm. If you are the only owner of an organization, delete that organization or transfer
ownership first. Account deletion removes your user account. It does not delete organizations,
projects, or event data.
