API CMS explained: what it's good at and where it breaks down
By Nayan Kyada · · 6 min read
Part of The Sanity + Next.js Guide
An API CMS — sometimes called an API-first or headless CMS — decouples content storage from content presentation. Instead of generating HTML server-side like WordPress does, it exposes your content through an HTTP or GraphQL API, and every consuming application — your Next.js site, your mobile app, your digital signage, your email renderer — fetches exactly what it needs. That flexibility is the whole pitch. Whether it pays off depends heavily on what your team actually builds.
What an API CMS is genuinely good at
Omnichannel content delivery
The strongest case for an API CMS is when the same content genuinely needs to appear in more than one place. A product description that lives in Sanity can feed your Next.js marketing site, your React Native app, your Shopify storefront, and a third-party partner API — all from one source of truth, all pulling from the same GROQ or REST endpoint.
With a traditional CMS, you'd be copying content between systems or building fragile sync jobs. With an API-first system, the content model is the integration point. Schema changes propagate to every consumer automatically, because they're all reading from the same API.
This isn't hypothetical. I've worked on projects where the same product document type in Sanity serves a Next.js e-commerce front end and a weekly email digest rendered by a Node.js script hitting the same Content Lake. The editorial team edits once. The field description shows up correctly in both places without any manual export.
Developer control over the data layer
A traditional CMS like WordPress gives you pre-shaped data — a post has a title, body, excerpt, and featured image. If you want something different, you're writing PHP plugins or fighting the REST API.
An API CMS gives you a blank schema. You define exactly what a caseStudy or landingPage document contains, what types are allowed in a Portable Text field, what references are valid. In Sanity, that schema lives as TypeScript:
// sanity/schemas/caseStudy.ts
import { defineType, defineField } from 'sanity'
export const caseStudy = defineType({
name: 'caseStudy',
title: 'Case study',
type: 'document',
fields: [
defineField({ name: 'client', type: 'string', validation: r => r.required() }),
defineField({ name: 'industry', type: 'string' }),
defineField({ name: 'outcomes', type: 'array', of: [{ type: 'block' }] }),
defineField({
name: 'relatedPosts',
type: 'array',
of: [{ type: 'reference', to: [{ type: 'post' }] }],
}),
],
})You own the data model. The CMS stores and serves it. That's a meaningful shift in control compared to fighting a plugin ecosystem.
Performance through selective fetching
Because you write your own queries, you fetch only what the page needs. A GROQ query for a blog listing page grabs slugs, titles, and cover image metadata — nothing else. The payload is small, the response is fast, and Next.js can cache it at the edge.
With a traditional CMS, you often get the whole document whether you want it or not, and either strip it client-side (wasteful) or write a custom endpoint (which is just reinventing API-first architecture anyway).
Where an API CMS falls short
Editor experience is an afterthought
This is the honest part most developer blog posts skip. API-first CMSs are designed by developers for developers. The editing interface — Sanity Studio, Contentful's web app, whatever Strapi ships — is functional, but it's not polished for non-technical editors.
WordPress has fifteen years of UX iteration aimed at writers and marketing teams. Sanity Studio is excellent by headless standards, but an editor coming from WordPress or Squarespace will still face a learning curve. If your client's content team is five non-technical marketers who publish daily, that friction is real and it lands on your project budget as training time and support tickets.
The risk isn't that the CMS can't do it — it's that no one budgets for the onboarding properly.
Preview is genuinely complex
In a traditional CMS, preview is built in. Click "Preview" and you see the page with draft content. In a headless setup, preview requires explicit engineering: a draft mode endpoint in Next.js, a secret token, a Sanity Presentation tool configuration, and a way to pass that context through your entire rendering tree.
// app/api/draft/route.ts
import { draftMode } from 'next/headers'
import { redirect } from 'next/navigation'
export async function GET(req: Request) {
const { searchParams } = new URL(req.url)
const secret = searchParams.get('secret')
const slug = searchParams.get('slug')
if (secret !== process.env.SANITY_PREVIEW_SECRET) {
return new Response('Invalid token', { status: 401 })
}
draftMode().enable()
redirect(slug ?? '/')
}That's the minimal version. Add Sanity's Presentation overlay, overlay components for visual editing, and CORS configuration for the studio domain, and you've got a non-trivial amount of infrastructure just so an editor can see their changes before publishing. It works — I use it on production projects — but it's engineering effort that traditional CMS users get for free.
Glue code accumulates fast
An API CMS solves content storage and delivery. Everything else — sitemap generation, redirect management, form handling, search indexing, email notifications on publish, image transformation pipelines — is your responsibility. You wire it up.
Sanity doesn't email your team when a post is published. You build a webhook handler and call SendGrid. Sanity doesn't update your Algolia index. You write the sync logic. Sanity doesn't generate a sitemap. You write the Next.js route handler.
None of this is hard, but every piece is custom code you now own and maintain. Projects that start with "we just need a blog" end up with 800 lines of infrastructure across webhooks, revalidation handlers, preview routes, and sitemap generators. That's fine if you've budgeted for it. It's a nasty surprise if you assumed the CMS handled it.
Cost scales with API calls, not seat count
Most API-first CMSs price on API requests, bandwidth, or document count — not on how many editors use the system. That's great for small teams. At scale, the math shifts. A site doing millions of page views with aggressive revalidation can hit CDN bandwidth limits or API rate limits on plans that seemed generous at the start.
Sanity's Growth plan includes 500k API CDN requests per month. At 10 requests per page build and aggressive ISR revalidation, that ceiling is reachable on a moderately trafficked site without careful query batching and edge caching in front of the API.
When an API CMS is the right call
Choose an API-first CMS when: you're building for more than one channel; your content model is genuinely custom; you have at least one developer who owns the integration long-term; and your editors are comfortable learning a new tool with proper onboarding.
Avoid it when: the site is a simple brochure with a non-technical owner who will maintain it themselves; your budget doesn't include the glue code engineering hours; or preview and draft workflow are dealbreakers that need to work on day one without custom work.
The API CMS model gives developers real leverage over the content layer. The cost is that you're building the rest of the system yourself — and that cost is real, recurring, and worth naming before you start.