Publish (headless / API)

Sanity

Publish documents and fix meta titles and descriptions in Sanity.

Connect your Sanity project with an API token and Eminex publishes approved articles as documents in your dataset, and fixes the meta title and description on documents you already have.

What Eminex does with Sanity

How to connect Sanity

  1. 1In Sanity, create an API token with write access for your project.
  2. 2In Eminex, open Connections, choose Website, and pick “Sanity · API”.
  3. 3Enter the project ID, the dataset (for example production), the token and, optionally, the document type.
  4. 4Click Connect to finish.

What you approve

Sanity documents are only written from articles you've approved. Published articles go live in your dataset straight away, so approve them when you're ready for them to appear.

Sanity questions

What if Eminex can't make a fix on Sanity itself?
The fix is marked as one for you, with the exact value to use and where it goes in Sanity. Fixes Eminex can make itself are marked so you can apply them in one go with Apply quick wins.
How do I know the Sanity connection still works?
Open the site in Connections and click Check connection. Eminex tests that your site loads and that Sanity answers, and tells you plainly if something needs reconnecting.
Does Eminex create drafts in Sanity?
No — documents are written as published. Your approval in Eminex is the review step.
Which fields does Eminex change?
Only metaTitle and metaDescription on documents with a matching slug. Canonicals and structured data come from your front end, so Eminex gives you those to add yourself.
Can I use a dataset other than production?
Yes. Enter any dataset name when you connect.

Related

Related integrations

Ready to connect Sanity?

Set it up once — Eminex does the rest.

Get started