🎤 Builder Talk: The Story Behind Lady Gaga’s Digital Experience – Register now

History experience

Understanding retention time, and document history status

History retention

In order to make Sanity Studio real-time, it 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 drafted document will always be available.

The retention period on your documents are defined by the plan you are on. We count retention time backward from the current day.

The retention time for the different plans are:

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

Revisions that are older than the cutoff will be truncated into one revision item, older transactions will be permanently deleted. The document history is truncated regularly every day.

GDPR

We introduced history retention to make it possible to use Sanity and be GDPR compliant. You can learn more about our security and compliance here.

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

The revision history for all your documents will be truncated to your new cutoff time when downgrade either by turning off the upgrade on your current plan, or switching to one with less included retention time.

Exploring history in Sanity Studio

While viewing a single document in the studio editor, you can access the history either by clicking the document status indicator in the very bottom of the editor view, or by opening the contextual menu by clicking the ellipsis icon in the top right corner of the editor and selecting History.

How to access document revision history

Document status labels

The labels under the title in the document editor shows whether the content you are looking at is published and/or a draft.

Published

The content in the editor is the same that is published to the API.

Draft

The content in the editor has not yet been published, or has been unpublished.

Published, Draft

The content has been edited after the document has been published.

Live

The document is in live edit mode, all changes are published real-time.

History status labels

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

Published

The document was published to the API.

Unpublished

The document was unpublished from the API.

Edited

The document was edited.

Truncated

Revisions before the cutoff date

Was this article helpful?