---
title: "EventWolf erasure"
description: "Learn which personal fields EventWolf can erase from a stored event, what an erasure leaves and records, what else it scrubs, and which copies you clear yourself."
url: "https://agentpost.tools/docs/eventwolf/concepts/erasure"
kind: concept
---

# Erasure

Erasure removes personal fields from one stored [event](/docs/eventwolf/concepts/events.md), such as a customer’s email in its `data`. A stored event stays as published; erasure is the one exception, and it only removes values. In the same step it removes the affected references and clears the frozen text of the event’s [notifications](/docs/eventwolf/concepts/notifications.md) and [pushes](/docs/eventwolf/concepts/push.md). It writes an audit record that holds no erased value. [Copies you clear yourself](#copies-you-clear-yourself) lists the rest.

Only the project’s secret key can erase, and only its own project’s events.

## What you can erase

An erasure names one event by its sequence, and the fields to remove as paths on the public CloudEvent:

-   **`data`,** whole, or a dotted path inside it, such as `data.customer.email`. Paths use a [filter’s](/docs/eventwolf/concepts/filters.md) dot-separated keys with letters, digits, `_`, `$`, and `-`. Arrays fan out, so `data.people.email` removes every entry’s email. A numeric segment can select an entry, so `data.people.0.email` removes the first entry’s email. To erase a key with a dot in its name, erase the object that holds it. EventWolf refuses keys named `__proto__`, `prototype`, or `constructor`.
-   **`subject`.**
-   **A producer extension,** by its name, such as `actor`, `onbehalfof`, `refs`, `workspace`, `summary`, `correlationid`, `causationid`, or `causationsource`. Write `summary`, not `extensions.summary`.

## Fields that stay

The event’s identity, its times, and the fields EventWolf keeps around it can’t be erased: `source`, `id`, `type`, `specversion`, `time`, `datacontenttype`, `dataschema`, `sequence`, `receivedAt`, `publishedBy`, `imported`, `erased`, and the storage fields, such as `projectId`, `seq`, `typeVersion`, and `parsedRefs`. One refused or malformed path fails the whole request with [`invalid_request`](/docs/eventwolf/errors.md#invalid_request), and `details.issues` names it as `paths.<index>`. Nothing is partly erased. An event that doesn’t exist answers [`not_found`](/docs/eventwolf/errors.md#not_found).

## What an erasure leaves

-   **The field is gone.** An object’s field is removed. An array entry becomes `null`, so the entries after it keep their positions.
-   **The record says what erasure was requested.** The event’s record gains `erased: { paths, lastErasedAt }`, beside the CloudEvent. Its `paths` gather every path asked for, including ones that were already absent.
-   **The schema version stays.** The record keeps the version the event was checked against, and what’s left of the event can fail that schema.
-   **Erasure is silent.** It publishes no event and sends nothing on the live tail. Read the event again to see it as it is now.
-   **Later sends carry what’s left.** A webhook attempt or [replay](/docs/eventwolf/concepts/replays.md) after the erasure sends the remaining fields.
-   **The event’s identity stays.** A publish or import with the same `source` and `id` still [deduplicates](/docs/eventwolf/concepts/events.md#duplicates) after the request passes its checks.

## What else it scrubs

These change in the same transaction as the event and the audit record, so either all of them change or none does:

-   **Parsed references.** A reference that came from an erased attribute, such as `actor`, is removed. So is a reference from a data path that overlaps an erased path. A reference keeps its data path without array indexes, so erasing one array entry can remove the references of the other entries at that path.
-   **Notification text.** Every notification made from the event, for every recipient, loses its title, body, and URL, and gets `erasedAt`, when it was erased. All of it goes, whichever field you erased, because a template’s text doesn’t record which field each part came from. The notification keeps its record, read state, and place in the inbox, so your app can show it in its own words, such as “This notification was removed”, or leave it out. A notification with `erasedAt` never has a `title`; every other one does.
-   **Push text.** Every push made from the event loses its stored text. A push still waiting to send ends `skipped` with `event_erased`. A push already sent keeps its record.

## The audit record

Each request writes one erasure record: its `id`, the `eventSequence`, the `paths` asked for, `erasedAt`, and `requestedBy`: its `actor`, its `onBehalfOf` when there is one, as [Who acted](/docs/platform/concepts/principals.md#who-acted) describes, and the channel it came through. It holds no erased value. The answer is that record alone, with no remaining event values, so a cached answer can’t bring them back.

Records stay until the project is deleted, even after [event retention](/docs/eventwolf/reference/config.md) removes the event.

Each new request writes its own record, even if a path is already absent. A retry with the same `Idempotency-Key` answers with the first record, as [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) describes.

## Copies you clear yourself

Erasure reaches the stored event and the copies above. Clear these yourself, or let their retention remove them:

-   **Ingestion failures.** A rejected publish keeps the first 4,096 bytes of what was sent and its validation issues, which can quote personal data. Nothing ties it to an accepted event. It stays until [ingestion-failure retention](/docs/eventwolf/concepts/events.md#rejected-events) removes it, after 30 days in Agentpost’s starting config.
-   **Webhook and push attempts.** An attempt stores no event body, but it keeps an error message, and a webhook attempt keeps the receiver’s response status, headers, and the first 2,048 bytes of its body, which can echo personal data. They stay until [delivery retention](/docs/eventwolf/concepts/deliveries.md#limits) removes them, after 90 days in Agentpost’s starting config.
-   **Saved answers.** The answer to an earlier write, kept for its `Idempotency-Key`, can hold personal data, such as notification text. EventWolf doesn’t search them; each is deleted when its key is, as [Conventions](/docs/eventwolf/reference.md#conventions) sets.
-   **Other events.** Erasure works on one event at a time. Your own events about the same principal are erased one by one: find them with `ref`, such as `ref=user:u_ana`. EventWolf’s own events copy facts too: an `ingest.rejected` event holds the rejection’s issues, and `push_address.invalidated` names the recipient. Erase their fields by their own sequence.
-   **Deliveries already sent or in flight.** A webhook receiver, Expo, or a phone keeps what it was sent, and nothing recalls it. An attempt already under way when the erasure commits can still send what it read before.
-   **Live streams.** A live tail or inbox stream client keeps what it already received.
-   **Logs and backups.** Agentpost’s logs and database backups keep their copies until they age out.
-   **Records with their own lifetime.** Recipient IDs, push addresses, subscription filters, and templates aren’t part of an event. A recipient ID taken from an event’s data stays on its notification. [Delete the recipient](/docs/eventwolf/reference/recipients.md#delete-a-recipient) to remove their notifications, follows, preferences, and push addresses.

Erase the same data in your own stores, and account for your backups.

## Limits

-   An erasure names 1 to 100 paths, each at most 1,024 characters and 64 data segments deep.

## Where to act on it

-   [Erase event fields](/docs/eventwolf/reference/events.md#erase-event-fields), [List event erasures](/docs/eventwolf/reference/events.md#list-event-erasures), [List events](/docs/eventwolf/reference/events.md#list-events) with `ref` to find a principal’s events, and [Delete a recipient](/docs/eventwolf/reference/recipients.md#delete-a-recipient).
-   The [events reference](/docs/eventwolf/reference/events.md).
