Can't write to content lake without subscription on free plan?

7 replies
Last updated: May 28, 2024
Has Sanity removed read/write API tokens on the free plan? So you can no longer write to the content lake (outside of the Studio) without a subscription?
AI Update

Good news - Sanity has NOT removed write API tokens from the free plan! The Editor token (which provides read+write access) is still available on all plans, including the free tier.

Based on this community thread from May 2024, there was some confusion around this when Sanity updated their plan structure. If you're seeing an error message like "On a Free plan, roleName must be viewer, editor, or deploy-studio," it's likely because:

  1. You're on a legacy free plan - The permissions for the editor role changed slightly when Sanity updated their plans
  2. You need to regenerate your token - If you're upgrading from an older free plan to the current free plan, you'll need to delete your existing token and create a new one

The solution is straightforward: go to your project's API settings in Sanity Manage (or run npx sanity@latest manage), remove the old token, and create a fresh Editor token. This should resolve any permission issues.

So yes, you can absolutely still write to the Content Lake outside of Studio on the free plan - you just need to use an Editor token with the proper role assignment. The roles documentation confirms that Editor tokens with read+write access are available on all plans, including free.

If you're building something that requires write access from your application, remember to keep your Editor tokens secure - they should only be used in server-side code, Sanity Functions, or backend services, never exposed in client-side code. Store them in environment variables and follow the token security best practices to protect your content.

Show original thread
7 replies
The Editor token is available on all plans, including the free one.
Trying to upgrade my plan to the ‘free’ version from a legacy one:
If it’s an older free plan, the permissions for the editor role have changed a bit. You’ll need to remove that token and create a new one after changing your plan.
Okay, thanks for confirming.
Let me know if you’re not able to get it to work!
It worked! Thanks again.
Excellent!

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.

Was this answer helpful?