
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeBased on my research, I can see the issue you're running into. The dataset copy feature you're trying to use is actually an Enterprise/Business plan feature, and the "manage datasets" permission isn't something you'll find as a checkbox in the token creation UI.
When you create a token in the Sanity management console under the "API" tab, you'll only see these standard roles:
The dataset copy endpoint requires administrative permissions that go beyond standard Editor or Viewer roles. According to the documentation, copying datasets is a feature available to Business and Enterprise customers.
1. Use an Administrator token: Create a token with the Administrator role (not Editor or Viewer). This role has the necessary permissions to manage datasets, including copying them. The guide's reference to "manage datasets" permission means you need a token with Administrator-level access—it's not a separate checkbox option.
2. Verify your plan: The dataset copy feature is part of Advanced Dataset Management, which is only available on Business and Enterprise plans. If you're on a Free or Growth plan, this endpoint won't work even with the correct token—it will appear to succeed but won't actually copy the data.
3. Check your workflow: Your GitHub Action code looks correct, but make sure:
SANITY_TOKEN secret contains an Administrator tokenIf you're on a Free or Growth plan or don't have access to the copy endpoint, you could:
Use the CLI: The Sanity CLI's export/import commands work on all plans:
sanity dataset export production backup.tar.gz
sanity dataset import backup.tar.gz stagingSanity Functions: Consider using Sanity Functions to automate dataset operations—they're serverless compute within Sanity and can handle content synchronization tasks without needing external hosting.
Upgrade your plan: If dataset copying is critical to your multi-environment workflow, consider upgrading to a Business or Enterprise plan.
The bottom line: The "manage datasets" permission mentioned in the guide refers to Administrator-level access, and the dataset copy API endpoint itself is a paid feature. You need both the right token role AND the right plan tier for this to work.
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