
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYou're getting this error because you can't create permissions documents directly through mutations. The _.groups documents you're trying to create are internal system documents that Sanity manages behind the scenes—they're not meant to be created or modified directly via sanity exec or standard content mutations.
Roles and permissions in Sanity should be managed through the proper channels, not by creating documents. Here are the officially supported methods:
The most straightforward way to create and manage roles is through the web interface at sanity.io/manage:
This interface handles all the underlying permission configuration for you and ensures everything is properly validated.
If you need to create or manage roles programmatically, use the Management API's Roles API. This is the official HTTP API for managing roles, permissions, and access control.
The Roles API provides proper endpoints for:
This requires an admin-level API token but works within the supported permission boundaries and is the maintainable, officially supported approach.
The error message mentioning "manage" permissions is telling you that even if you had elevated credentials, you still couldn't create _.groups documents directly—they're part of Sanity's internal access control infrastructure. The platform manages these system documents automatically when you use the proper interfaces (web UI or Roles API).
Keep in mind that custom roles are an Enterprise-only feature. If you're not on an Enterprise plan, you're limited to Sanity's default roles (Administrator, Editor, Viewer, Developer, and Contributor) and cannot create custom permission configurations.
The key takeaway: Don't try to create permissions documents directly. Always use either the web interface at sanity.io/manage or the Management API's Roles endpoints to manage your project's access control.
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store