Skip to main content
Sanity says that “to create a robot token, you must have developer, admin, or an equivalent custom role in the project.” A token with an expiry stops working on that date, and Sanity does not let you remove an expiry once it is set, so leave the expiry unset unless your policy requires one.

Find your Project ID

Your Project ID identifies the Sanity project to connect. Sign in to Sanity Manage and open your project from the organization dashboard.

  • No projects yet? Click + New project in the project selector dropdown at the top of the page to create one first.
  • Copy the Project ID shown on the project’s overview / settings page across.

Create a project API token

A project token can act only on the one project it belongs to.

1

Create the token

In your project, open API > Tokens.

  • Click Add API token.
  • Name: StackOne Integration
  • Expiration: No expiration
2

Choose the permissions

Pick the token’s permissions in the same dialog.

  • Under Permissions > Access level, select Editor.
  • Expand Other roles.
  • Select Access Manager.
  • Select Blueprints Deployer.
  • Click Add token.
3

Copy the token

Sanity shows the token once, right after you create it.

  • Copy the API Token across. It starts with sk.

Which permissions to select (by resource / operation)

Each token permission unlocks a different part of this connector. Select the combination that matches the actions you use:

  • Editor — documents (query, get, mutate, export, history) and assets (upload, link), plus read access to datasets, members, roles, and tags
  • Viewer — read-only documents and project reads; use instead of Editor for a read-only connection
  • Access Manager — invites, member role changes and removal, roles and permissions, and tag writes
  • Blueprints Deployer — dataset create/update/delete, project update, and webhook management (required to enable webhook events)
  • Note: a few actions are marked preview and additionally require a Business/Enterprise plan (tag writes, role/permission writes, dataset copy) or a Media Library (link asset), regardless of token permissions.
1

Connect

  • Click Connect.
  • If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
  • Once authorization is successful, you will see a confirmation popup.
2

Use Actions

Connect an AI platform to the linked account’s actions. See AI Platforms.Other ways to call actions are listed in Protocols & SDKs.

Next Steps

Webhooks setup

Configure receiving Events for Sanity into StackOne.