Paste one API token — articles arrive as documents in your own Sanity dataset.
Sanity is built for programmatic content. You paste your project ID, dataset and an Editor API token, DraftSEO reads your document types, and you confirm which fields hold the title, the body, the slug and the main image. Each article is then written as a document of your own type — the body converted to Portable Text, every image uploaded as a Sanity asset. Sanity is headless, so your own website displays the article; you tell DraftSEO the address pattern your posts live at.
| Connection | Project ID + API token — sanity.io/manage → API → Tokens, Editor permission |
|---|---|
| Body formats | Portable Text · Markdown · text — matched to your body field |
| Image hosting | Sanity assets on cdn.sanity.io — uploaded, never hot-linked |
| Your own fields | Left untouched on republish — only the mapped fields are written |
| Publish modes | Auto · draft · scheduled |
Who does what
Nothing — once the token is pasted and the fields are mapped, documents appear in your dataset and your website shows them. Want to review first? Send them as drafts and publish from Sanity Studio.
Works with whatever your document type and its fields are called.
Setup
In sanity.io/manage open your project → API → Tokens → Add API token. Choose the Editor permission and copy it — it is shown once.
~1 minute
Connect a site → Sanity → paste your project ID, dataset and the token. DraftSEO lists the document types an article can go into.
~1 minute
Confirm which fields hold the title, body, slug and main image. DraftSEO suggests the mapping from your own schema.
~2 minutes
Tell DraftSEO where posts appear on your website, e.g. https://www.yoursite.com/blog/{slug}.
~30 seconds
FAQ
Yes — it is the default. DraftSEO converts each article into Portable Text blocks with headings, lists, links and images, using only the styles your schema allows. Markdown fields and plain text fields are supported too. Portable Text has no table or video block by default, so tables become one line per row and videos become links.
Your choice. Published articles are live in your dataset straight away. Drafts are saved as normal Sanity Studio drafts, so you can review them and press Publish in Studio.
No. DraftSEO only writes the fields you mapped. An author, categories or anything else your editors fill in stays as it is.
In your own Sanity project, as image assets served from cdn.sanity.io. Each image is uploaded before the document is written, so the article never loads images from our servers.
No card required. Images hosted as your own Sanity assets.