# Audit Logs

## Overview

Audit logs give you a revision history for your feeds data. When enabled, Stream
records a revision every time an activity or a comment is created, edited,
deleted, or restored. Each revision captures who made the change, what changed,
and a snapshot of the object as it was before the change, so you have a
complete, chronological trail of how your content evolved.

You enable audit logs and browse revision history from the Stream Dashboard.

## What gets tracked

Audit logs currently track two object types: **activities** and **comments**.

For each of those, the following actions produce a revision:

| Action    | When it's recorded                                                                                                                                  |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `create`  | The object is first created. There is no previous state, so no snapshot is stored.                                                                  |
| `edit`    | The object is updated in place. The revision records the fields that changed and a snapshot of the object before the edit. Empty edits are skipped. |
| `delete`  | The object is soft-deleted. The revision stores a snapshot of the object before deletion.                                                           |
| `restore` | A soft-deleted object is restored.                                                                                                                  |

<admonition type="info">

Hard deletes are not recorded as a revision. When an object is hard-deleted, all
of its existing revisions are permanently removed along with it.

</admonition>

### Actor types

Every revision records who performed the change:

| Actor type | Description                                                                                                               |
| ---------- | ------------------------------------------------------------------------------------------------------------------------- |
| `user`     | A change made by an end user through a client-side (token-authenticated) request. The `user_id` identifies that user.     |
| `admin`    | A change made server-side with your API key and secret. The `user_id` is empty, because the acting party is your backend. |
| `system`   | A change made automatically by Stream, such as background enrichment.                                                     |

## What each revision records

| Field                     | Description                                                                          |
| ------------------------- | ------------------------------------------------------------------------------------ |
| `object_id`               | The ID of the activity or comment the revision belongs to.                           |
| `object_type`             | Either `activity` or `comment`.                                                      |
| `action_type`             | `create`, `edit`, `delete`, or `restore`.                                            |
| `actor_type`              | `user`, `admin`, or `system`.                                                        |
| `user_id`                 | The user who made the change. Empty for `admin` and `system` actors.                 |
| `changed_fields`          | The list of fields that changed. Present on `edit` revisions.                        |
| `previous_obj_serialized` | A snapshot of the object as it was before this change. Absent on `create` revisions. |
| `created_at`              | When the revision was recorded.                                                      |

## Enabling audit logs

Audit logs are **off by default** and are enabled per app from the Stream
Dashboard:

1. Open the [Stream Dashboard](https://beta.dashboard.getstream.io/) and select your app.
2. Open the **Feeds** section and, under **Logs**, select **Audit**.
3. Turn on the **Audit Logs** toggle.

While audit logs are disabled, no revisions are recorded and revision history is
not available. Turning the toggle back off stops new revisions from being
recorded; revisions already captured remain until they age out of the retention
window.

## Retention

Revisions are retained for a fixed window (30 days by default). Revisions older
than the retention window are automatically deleted.

<admonition type="info">

The retention window is configured by Stream and is not customer-editable. To
change how long revisions are kept, [contact support](https://getstream.io/contact/support/).

</admonition>

## Viewing revisions

Under **Feeds > Audit**, the **Revision History** table lists revisions newest
first, with a column for each of the following:

- **Date**: when the revision was recorded
- **Action**: `create`, `edit`, `delete`, or `restore`
- **Object Type**: `activity` or `comment`
- **Object ID**: the ID of the changed object
- **User ID**: the user who made the change (empty for admin and system actors)
- **Changed Fields**: the fields that changed on an `edit`

Use **Filter** to narrow the table down by object, action, user, or time range.


---

This page was last updated at 2026-07-15T14:12:44.070Z.

For the most recent version of this documentation, visit [https://getstream.io/activity-feeds/docs/react-native/audit-logs/](https://getstream.io/activity-feeds/docs/react-native/audit-logs/).