Sanity integration
Sanity is a headless content platform. Many teams use it to run their blog or website. The Sanity integration publishes Zerply blog posts straight into your Sanity project. You no longer copy finished content into Sanity Studio by hand.
Connect a project once. After that, a Publish to Sanity option appears next to your AI chat replies and inside the blog editor. You trigger each publish yourself. Zerply reads your Sanity schema to publish correctly, but it never pulls your existing content back into Zerply.
The WordPress integration works the same way and lives in the same settings page. Connect either one, or both, based on where your site runs.
Before you start
Section titled “Before you start”Gather these first:
- A Zerply account with at least one workspace. New to Zerply? Start with Setting Up Your Workspace.
- Your Sanity project ID and dataset name. The dataset is usually
production. - An API token with Editor access. Create one in Sanity Manage, under API → Tokens.
A Studio URL is optional. Add it, and Zerply links straight to each document it publishes.
Connect your Sanity project
Section titled “Connect your Sanity project”- Go to Settings → Website in Zerply.
- Find the Sanity section and click Connect Sanity project.
- Enter your Project ID, Dataset, and API token.
- Add your Studio URL, for example
https://yourname.sanity.studio. This step is optional. - Click Detect schema. Zerply samples your dataset and suggests a document type and field mapping.
- Review the suggestion, then click Connect project.
Zerply checks the token, project, and dataset before it saves the connection. An empty dataset gives detection nothing to read. In that case, type your document type and field names by hand.
Need to publish to more than one project? Click Add another project and repeat these steps. A team can connect several Sanity projects at once.
Check your field mapping
Section titled “Check your field mapping”Every Sanity project can name its fields differently. Zerply asks which field holds what, so it writes content to the right place.
Click Customize schema mapping to review these:
| Field | What it holds |
|---|---|
| Document type | The schema type Zerply writes to, for example post |
| Title field | Where the post title goes |
| Body field | Where the post content goes |
| Slug field | Where the URL slug goes |
| Image field | Where the featured image goes |
| Published date field | Where the publish date goes |
Schema detection fills these in for you. Change any value if your project uses a different field name, or if you switch document types.
One field is fixed: the slug always comes from the post title. Zerply does not offer a custom slug field.
Publish content to Sanity
Section titled “Publish content to Sanity”A connection marked Connected project unlocks two publish points:
- A Sanity icon next to each AI chat reply.
- A Sanity icon in the blog editor toolbar.
Click either one to open the Publish to Sanity dialog.
- Pick a Sanity Project, if more than one is connected.
- Check or edit the post title.
- Choose Save as Draft or Publish Immediately under Status.
- Click Publish Now or Save as Draft.
Zerply creates the document and shows a confirmation. When your Studio URL is set, the confirmation links straight to the new document. Occasionally Zerply cannot confirm the write went through cleanly. When that happens, it still tells you the document was created, and it flags what to check in Studio.
One thing to know about images: the featured image you attach becomes a real Sanity image asset. Any other image inside the post body stays as a plain text link instead. Open Studio and check the body if your post carries more than one image.
Manage your connections
Section titled “Manage your connections”Every connected project appears in Settings → Website.
- Needs verification means Zerply has not confirmed the token recently, or the last check failed. Click Verify to run it again.
- Only connections marked Connected project show up as publish targets. Verify a connection before you rely on it.
- Remove disconnects a project from Zerply. Nothing already published to Sanity is affected.
Does this integration keep Zerply and Sanity in sync?
No. Publishing runs one direction, from Zerply into Sanity, and only when you click a publish button. Zerply never reads your Sanity content back in, and never republishes on its own.
Can I publish the same post to WordPress and Sanity?
Yes. Both integrations live under Settings → Website, each with its own publish button. Pick whichever destination matches where the post belongs.
What if I skip schema detection?
You can still connect a project. Type your document type and field names by hand, matching your own Sanity schema. Run Detect schema later, once your dataset has documents to sample.
Why does my connection say "Needs verification"?
Zerply has not confirmed the token, project, and dataset recently, or the last check failed. Click Verify on that connection card. Until verification passes, it stays out of the publish dialog.
Can I set my own slug?
Not currently. Zerply generates the slug from the post title on every publish.
I removed a connection by accident. Did that delete anything in Sanity?
No. Removing a connection only stops future publishing through Zerply. Add the same project ID and dataset back to restore the link.