Step 1 — Create an API token in Sanity
1
Open your project
Go to sanity.io/manage and open your project. Copy the Project ID shown there. It’s also in your
sanity.config.ts.2
Add a token
Open API → Tokens, click Add API token, give it a name like
Ryze, choose Editor permissions, and copy the token.Step 2 — Connect in Ryze
In Workspace Settings → Integrations, click Connect on the Sanity card and fill in:- Project ID — the ID you copied, e.g.
abc123de - API token — the Editor token you created
- Dataset (optional) — leave empty to use
production - Blog URL — the public URL your site serves posts under. A post with the slug
my-postmust live at{Blog URL}/my-post, e.g.https://yoursite.com/blog/my-post
The dataset needs at least one published post of that type. Ryze reads your newest posts to learn their fields: title, slug, body (Portable Text, markdown or HTML), excerpt, SEO title and description, publish date and main image. If every recent post has an author and a category, Ryze copies those references from the newest post.
How publishing works
- Each article becomes a published document, not a draft. Its images are uploaded as Sanity assets.
- On republish, Ryze updates its own document and keeps any fields it doesn’t manage. If someone left an unpublished Studio draft of a Ryze article, it’s discarded.
- Unpublish deletes Ryze’s document and its draft.
- Edits you make to a Ryze article in Studio are replaced the next time Ryze republishes it. Change the article in Ryze instead.
- Articles can contain images in the body. Make sure your body field allows images (add
{type: 'image'}to the body array in your schema), otherwise Studio shows them as unknown blocks. - Ryze never edits or deletes posts it didn’t create. If one of your posts already uses the same slug, publishing stops and asks you to rename the article slug.
Troubleshooting
- Token rejected — check that the Project ID matches the one on sanity.io/manage, and that the token belongs to that project.
- Token can read but cannot write — the token has Viewer permissions. Create a new one with Editor permissions and connect again.
- No such project or dataset — copy the Project ID from sanity.io/manage and check the dataset name (most projects use
production). - No document types to pick — the dataset has no published documents yet. Publish at least one blog post in Sanity Studio, then pick its type.
- Sanity publish not configured — make sure at least one published post of the chosen type has a slug and a body.
- A document with this slug already exists — one of your own posts uses that slug. Rename the article slug in Ryze, or remove that document in Sanity.
- Article published but 404 on the site — check the Blog URL matches where your site serves posts, and rebuild the site if it’s static.

