How to modify and delete grants and roles in the new Role/permissions system.
Based on the documentation I've reviewed, here's what you can do with the new Roles/permissions system:
Deleting Grants
Yes, you can manage grants! While the documentation doesn't explicitly show a standalone DELETE request to a /grants endpoint in the format you mentioned, grants are now managed through role permissions in the new Access API.
In the new Access API (v2025-07-11), grants are part of role permissions. To remove a grant from a role, you would:
- Update the role using
PATCH /v2025-07-11/access/{resourceType}/{resourceId}/roles/{roleName}and modify the permissions array to exclude the grant you want to remove - Or delete the entire role (see below) if that's what you need
The old /grants endpoint pattern you're referencing was part of the v2021-06-07 API. The new API has restructured this into the role-based endpoints where permissions (which include what were previously called "grants") are managed as part of roles.
Deleting Roles
Yes, you can delete custom roles! Use this endpoint:
DELETE /v2025-07-11/access/{resourceType}/{resourceId}/roles/{roleName}This requires:
- Permission:
sanity.{resourceType}.roles.delete - Feature:
advancedRolesManagement(Enterprise feature)
Important notes:
- You can only delete custom roles (where
isCustom: true) - Pre-defined roles (administrator, editor, viewer, etc.) cannot be deleted, but on Enterprise plans with advanced roles management enabled, they can be removed from appearing in the resource
- Once deleted, the role won't show up when you fetch the
/rolesendpoint
The Access API documentation shows all available endpoints. The new API (v2025-07-11) has significantly restructured how roles and permissions work compared to the older v2021-06-07 API, consolidating grants, resources, and permission resource schemas into a simpler "permissions" concept that's managed within roles.
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.