Content Releases configuration
Configure Content Releases in Sanity Studio
Content Releases lets you organize and schedule updates across multiple documents. You can plan, preview, and validate significant changes in advance, so related updates publish together without conflicts.
This document explores configuring Content Releases in Sanity Studio. For details on using Content Releases, or interacting with the API, follow these links:
This is a paid feature
This feature is available on certain Enterprise plans. Talk to sales to learn more.
Prerequisites
- Sanity Studio v3.77.0 or later, where Content Releases is enabled by default.
- Sanity Studio v3.80.0 or later to export or import a dataset that contains releases.
- API version
v2025-02-19or later on any client that queries or previews release content.
Setup and configuration
Content Releases is enabled by default for studios running version 3.77.0 or later. Update any official plugins and dependencies, such as AI Assist, the Vision Tool, and any presentation-related plugins, to ensure compatibility.
Running the Scheduled Publishing plugin alongside Content Releases adds a second set of scheduling controls to the Studio, which makes it unclear which system publishes a document. Sanity recommends migrating to Content Releases and disabling Scheduled Publishing.
Limit release count per workspace
Release quotas apply at both the organization and dataset level. To limit the number of active releases an individual workspace or studio can create, set the releases.limit value in your studio's configuration file. When unset, the workspace imposes no limit of its own.
import {defineConfig} from 'sanity'
export default defineConfig({
// ...
releases: {
limit: 2
}
})This limits creation of new releases beyond the limit in Studio. It does not prevent creation from the API or other inputs.
Disable releases
To disable Content Releases for your studio, update your configuration file. Scheduled Drafts uses the same underlying tool, so to remove it as well, also set scheduledDrafts: {enabled: false}.
import {defineConfig} from 'sanity'
export default defineConfig({
// ...
releases: {
enabled: false
},
scheduledDrafts: {
enabled: false
}
})Limit releases to certain users
Users of content resources and custom roles can restrict access for:
- Editing documents in releases by using a filter like
_id in path("versions.**")for any release or_id in path("versions.rA29bfjqa.**")for documents in a specific release. - Performing release actions such as creating, publishing, and archiving releases by using a filter like
_id in path("_.releases.**")for any release or_id == "_.releases.rA29bfjqa"for a specific release.
Disable drafts
Some organizations prefer to only allow edits in Content Releases, and disable draft documents completely. When drafts are disabled, documents can then only be edited inside a release, or outside a release if their schema type has liveEdit: true. To disable drafts, set the document.drafts.enabled setting to false in your studio's sanity.config.ts.
import {defineConfig} from 'sanity'
export default defineConfig({
// ...
document: {
drafts: {
enabled: false
}
}
})Limitations
- In Sanity versions prior to 3.80.0, dataset imports failed on datasets that contain versions, with the error
Invalid document version ID "versions.<id>": "versions" is a reserved prefix. Update to 3.80.0 or later before you export or import a dataset. - When you schedule a release, we perform checks in the background to ensure reference integrity between documents. These checks do not take into account cross-dataset references.
- GROQ-powered webhooks can trigger on version documents from API version
v2025-02-19onward. Enable the "Trigger webhook when versions are modified" setting in sanity.io/manage, or setincludeAllVersions: truevia the Webhooks API. Version and draft documents are ignored by default. - Use the
client.releasesmethods in@sanity/client7.8.0 or later to create, edit, schedule, publish, archive, and delete releases, andclient.createVersion()/client.unpublishVersion()for document versions. See Content Releases and versions with @sanity/client. - API changes supporting Content Releases introduced changes to perspectives. See the changelog for details on breaking changes.
Presentation and Visual Editing
Content Release previews in Presentation work with front ends that use Loaders. This includes @sanity/core-loader, @sanity/react-loader, @sanity/svelte-loader, and packages that rely on them such as next-sanity (with a loader or defineLive) and @nuxtjs/sanity.
Configure your clients to use the v2025-02-19 version of the API to enable previewing.
For applications configured with official loaders and the Presentation Tool, Presentation previews Content Releases as expected. The preferred path is Presentation Tool and Loaders. For custom implementations, see the Content Release API cheat sheet.
Follow our guides for Visual Editing to configure the Presentation Tool in your application.
Supported plugins
Official plugins have been updated to support Content Releases. We recommend updating to the latest versions of any official plugins to ensure full compatibility.