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

Content updates visible in Desk/Vision but not available through API

23 repliesLast updated: Nov 29, 2025

has anyone ever experienced an issue where no content updates will come through your API, but they are visible in the Desk/Vision UI both locally and sanity hosted, and the UI inspector?
AI Update

This is a classic issue that catches people! Yes, this happens, and it's almost always related to API perspectives and a recent default behavior change.

The Most Likely Cause: Perspective Mismatch

When you see content in Studio/Vision but not in your API responses, you're probably querying with the published perspective (or no perspective specified, which now defaults to published as of API version 2025-02-19), but your documents only exist as drafts.

Here's what's happening:

Quick Fixes

1. Check if your documents are published: Look at the document ID in Studio. If it starts with drafts., it hasn't been published yet. Click the "Publish" button in Studio.

2. Use the correct perspective in your API calls:

Add ?perspective=previewDrafts to your API URL:

https://YOUR_PROJECT_ID.api.sanity.io/v2025-02-19/data/query/YOUR_DATASET?query=YOUR_QUERY&perspective=previewDrafts

3. If using a client library:

const client = createClient({
  // ... other config
  perspective: 'previewDrafts', // or 'raw' to see everything
})

Understanding Perspectives

Sanity has several perspectives:

Recent Breaking Change

If this suddenly started happening after February 2025, note that the default perspective changed from raw to published in API version 2025-02-19. This means if you're using the latest API version without explicitly setting a perspective, you'll only see published content.

Still Not Working?

If you've verified the perspective and documents are published, check:

The UI inspector and Vision both use the raw perspective by default, which is why you see the content there but not in your production API calls. This is actually a feature - it lets you preview unpublished changes!

Show original thread
23 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