User guides

History experience

Understanding retention time and document history status

History retention

To make Sanity Studio real-time, the studio sends edits as patches to the backend. All these patches are stored as transactions. Together they make up your documents’ revision history.

History retention is the amount of time you have access to these revisions before they are automatically deleted. The latest version of your published and draft documents is always available.

Your plan defines the retention period for your documents. We count retention time backward from the current day.

The retention times for the different plans are:

  • Free: 3 days
  • Growth: 90 days
  • Enterprise: 365 days, or contact us for custom retention

Revisions older than the cutoff are truncated into one revision item, and older transactions are permanently deleted. Document history is truncated daily.

GDPR

We introduced history retention so you can use Sanity and comply with the General Data Protection Regulation (GDPR). You can learn more about our security and compliance.

Upgrading the retention time

If you change retention time by changing plans, or upgrading on your current plan, this will only affect the retention cutoff time by postponing it to however long your retention time is. The retention history for your documents will stay as it was before the upgrade.

Downgrading the retention time

When you downgrade, either by turning off the upgrade on your current plan or by switching to a plan with less included retention time, the revision history for all your documents is truncated to your new cutoff time.

Explore history in Sanity Studio

To open a document's history, open the document in the studio editor. Then click the document status indicator at the bottom of the editor, or click the ellipsis icon in the top right corner of the editor to open the context menu and select History.

How to access document revision history

Nested release history

When a document is published as part of a Content Release, its history combines all of the changes into a single entry. To explore the individual history entries from when the document was part of the release, do the following:

  • Select the Published pill at the top of the document.
  • Select the Actions menu (the ellipsis icon) on the history entry for the release.
  • Select the Inspect option for the release document to view the history of the document's edits in the release.

After you select it, the history updates to show the changes made to the document between when the version was created and when the release was published.

Document status pills and badges

The pills at the top of the document editor show which versions of the document exist. Select a pill to switch the editor to that version.

Published

The published version of the document, which is the content available through the API. Hover over the pill to see when the document was last published. The pill is disabled if the document isn't published.

Draft

The draft version of the document, which holds changes that aren't published yet. The pill is highlighted when a draft exists, and hovering over it shows when the draft was last edited. Live-edit documents don't have drafts, so the pill is disabled for them.

Releases

If the document is in one or more content releases, each release gets its own pill, labeled with the release name. Select it to view and edit the document's version in that release.

Live

A Live badge in the status bar at the bottom of the editor means the document is in live edit mode. All changes are published in real time and skip the draft workflow. This is not to be confused with the Live Content API, which is a way of rendering published content changes instantly.

History status labels

These are the labels for the revision items in the history view.

Created

The document was created.

Draft created

A draft of the document was created.

Published

The document was published to the API.

Unpublished

The document was unpublished from the API.

Edited

The document was edited.

Live edited

The document was edited in live edit mode, so the change was published immediately.

Discarded draft

The draft was discarded without being published.

Version created

A version of the document was created in a content release.

Version discarded

The document's version in a content release was discarded.

Deleted

The document was deleted.

Deleted by retention policy

Older history for the document was deleted by your plan's retention policy.

Was this page helpful?

Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change site theme