Skip to main content

Supported syncing

For more information about sync modes, refer to the sync modes docs.

Connect to Sanity

Go to the Destinations overview page and click the Add destination button. Select Sanity and click Continue. You can then authenticate Hightouch to Sanity. Enter the following fields into Hightouch:
  • Project ID: Find your Project ID on the project’s main dashboard.
  • API token: Generate or find your API token for your project under the API tab.

Sync configuration

Once you’ve set up your Sanity destination and have a model to pull data from, you can set up your sync configuration to begin syncing data. Go to the Syncs overview page and click the Add sync button to begin. Then, select the relevant model and the Sanity destination you want to sync to.

Syncing documents

Sync data from any source to Sanity documents. Define document schemas and types in your Sanity project, and sync document properties and fields to Sanity using Hightouch.

Record matching

To match rows from your model to documents in Sanity, you need to select the model column that contains values that match the ID field. You can match on any of the following Sanity fields:
  • ID
  • custom matching field (recommended unique)
Refer to the record matching docs for more information.
In Insert mode, Sanity automatically generates an identifier for every new record synced.

Field mapping

Hightouch lets you sync document fields via field mapping. You can map data from any of your model columns to default and custom document schema fields. Ensure your model’s columns have the same data types as the fields you want to sync to. Prior to syncing, define your document type’s schema in your Sanity project. To write to Sanity documents, map your source fields to your defined custom document schema fields.

Update mode and Upsert mode

Hightouch leverages Sanity’s patch mutation API to support both Update and Upsert modes. The integration currently uses the set operation, which replaces the values of the fields mapped in your configuration.
We recommend maintaining a clear separation between fields managed by Hightouch and those edited manually in Sanity. Any field mapped to Hightouch will be overwritten during updates and upserts. To preserve human-managed content, exclude those fields from your Hightouch mappings.

Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the live debugger. To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up sync alerts. If you run into an issue this page doesn’t cover, .
Last modified on May 5, 2025