
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis is absolutely possible and a pretty common pattern! You're essentially looking to create a one-way sync from your existing system to Sanity, where Sanity acts as an "enrichment layer" for your tags. Let me break down your questions:
Yes, very straightforward. The schema mutation you're describing (adding an image field in Sanity that doesn't exist in your source system) is actually one of the main benefits of this pattern. Here's how it works:
Your Sanity schema would look something like:
{
name: 'tag',
type: 'document',
fields: [
{name: 'label', type: 'string', readOnly: true},
{name: 'slug', type: 'slug', readOnly: true},
{name: 'image', type: 'image'} // Editorial addition
]
}The sync process from your external system would only touch label and slug, leaving image completely under editorial control. You can use the Sanity client to create or update documents.
Key trap to avoid: Use createOrReplace() carefully or use patch() instead. With createOrReplace(), you'll completely replace the document, which would wipe out the image if editors added one. Better approach:
await client
.patch(externalTag.id)
.set({label: externalTag.label, slug: {current: externalTag.slug}})
.commit()This way, only the fields you explicitly set are updated, preserving the editorial image field.
Yes, this is a well-established pattern at Sanity. In fact, Sanity Connect for Shopify works exactly this way - syncing product data from Shopify while allowing editors to enrich it with additional fields in Sanity.
Benefits of this approach:
Implementation recommendations:
_id to make syncing deterministic (e.g., _id: externalTag.id)Additional variables to consider:
This pattern is battle-tested and gives you the best of both worlds - operational control where it matters and editorial flexibility where you need it. The guide on integrating external data sources provides more detailed examples of sync implementations if you need them!
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store