Joint session with Vercel: How to build intelligent storefronts (May 15th)

Can Sanity mutate API create draft documents without publishing?

6 repliesLast updated: Nov 29, 2025

hey could someone clarify whether the mutate api allows drafting (but not publishing) posts? https://www.sanity.io/docs/http-mutations#patch-2f480b2baca5
i've been getting 500 errors when testing out this api and im not entirely sure why.
AI Update

Yes, the Mutate API absolutely allows you to create drafts without publishing! You do this by prefixing the document _id with drafts.

Creating Drafts via the Mutate API

When you want to save a document as a draft (not published), simply add the drafts. prefix to the _id:

{
  "create": {
    "_id": "drafts.post-123",
    "_type": "post",
    "title": "Example Post"
  }
}

This creates a draft document that exists separately from any published version. When you later publish it from Sanity Studio, the draft merges with the published document.

About those 500 errors...

500 errors from the Mutate API can have several causes. Here are the most common culprits:

1. Document size limits

2. Rate limits

3. Attribute limits

4. Authentication issues

5. Validation or malformed data

Debugging tips

To troubleshoot your 500 errors:

The draft functionality itself is rock-solid and widely used, so the 500 errors are likely related to one of the limits or data issues above rather than the draft mechanism itself.

Show original thread
6 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

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.

Related contributions