Live
Publish to Sanity
Documents with Portable Text bodies, slugs and image assets, drafts like Studio.
- Connects via
- Sanity Mutations API with an Editor token
- Lands as
- Documents of a schema type (default post)
- Tested
- Automated API tests
What syncs
What Optimizly writes
- All mapped fields via a configurable field map
- Body as Portable Text, HTML or Markdown
- Slug as a slug field
- Featured image uploaded as an image asset
- Draft and published documents, like Studio
Limitations
Good to know
- Items that are not yet published in Optimizly, or targets with publishing switched off, are saved as drafts.
Setup
Connect Sanity
- At manage.sanity.io → project → API → Tokens, add a token with Editor permissions.
- Note the project ID, dataset (default production) and document type (default post).
- In Optimizly add a Sanity target with those values.
- Optional: adjust the field map (logical field → your CMS field; dotted paths write into components such as seo.metaTitle, an empty value skips a field) and a URL pattern such as https://example.com/blog/{slug}.
- In Optimizly: Publishing → Add target → choose the platform, paste the credentials and click Test connection. Credentials are stored encrypted.
Publish your next article to Sanity.
Start a free trial, add your site as publishing target and test the connection.