Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change Site Theme

Changelog

Track new features, improvements, and fixes across all Sanity products.

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

On this page

Back to Changelog
  1. Changelog
  2. JavaScript Client

Release and document version actions support

Published: May 9, 2025

v7.2.0
JavaScript Client

Content Release and Document Version operations

The client now has complete abstractions and types for all Content Lake release and version actions.

These are available to be used directly interfacing with the server action:

client.action(
  {
    actionType: 'sanity.action.document.version.create',
    publishedId: 'bike-123',
    document: {
      _id: 'versions.new-bike-release.bike-123'
      _type: 'bike'
    }
  }
)

Or additionally through method abstractions which provide more unified concepts such as releaseId and publishedId, in addition to client side guards on mismatching IDs:

client.createVersion(
  {
    publishedId: 'bike-123',
    releaseId: 'new-bike-release',
    document: {
      _type: 'bike'
    }
  }
)

Deprecation notice of some document server actions

The discard and replaceDraft actions now have deprecation notices in the client, to reflect updates on the underlying Content Lake API.

discard is superseded by discardVersion and replaceDraft by replaceVersion

On this page

  • Content Release and Document Version operations
client.action(
  {
    actionType: 'sanity.action.document.version.create',
    publishedId: 'bike-123',
    document: {
      _id: 'versions.new-bike-release.bike-123'
      _type: 'bike'
    }
  }
)
client.createVersion(
  {
    publishedId: 'bike-123',
    releaseId: 'new-bike-release',
    document: {
      _type: 'bike'
    }
  }
)
Sanity logo

Documentation

    • Overview
    • Platform introduction
    • Next.js quickstart
    • Nuxt.js quickstart
    • Astro quickstart
    • React Router quickstart
    • Studio quickstart
    • Build with AI
    • Content Lake
    • Functions
    • APIs and SDKs
    • Agent Actions
    • Visual Editing
    • Blueprints
    • Platform management
    • Dashboard
    • Studio
    • Canvas
    • Media Library
    • App SDK
    • Content Agent
    • HTTP API
    • CLI
    • Libraries
    • Specifications
    • Changelog
    • User guides
    • Developer guides
    • Courses and certifications
    • Join the community
    • Templates