
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI'm really sorry to hear about your products getting wiped! The good news is that yes, you can likely restore them using Sanity's document history system, as long as the deletion happened within your plan's retention period.
The fastest way to restore your deleted products is through the History API. Here's what you need to know:
First, check your retention window:
If your deletion happened within this window, your data is still recoverable!
Even though documents are deleted, you can still access them if you know their _id. You have two main options:
https://your-studio.sanity.studio/desk/yourDocumentType;documentIdUse the History API to retrieve previous versions of your deleted products, then restore them using the JavaScript client's createOrReplace() method with the entire document from the history API as the payload.
Here's a basic approach:
_rev property to identify the revision you want to restoreclient.createOrReplace() with the retrieved document dataYou can find detailed guidance on this process in the restoring deleted documents guide and these community answers about restoring accidentally deleted documents.
If you're on a Free plan and it's been more than 3 days, or if you need help with the restoration process, I'd recommend reaching out to Sanity support directly—they may be able to help depending on your situation.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store