> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serpyseo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Sanity

Use the Sanity integration if your website uses Sanity as a headless CMS.

## How to connect Sanity

1. Go to Settings.
2. Open Integrations.
3. Choose Sanity.
4. Click Connect.

**Add your Project ID:**

1. Open your project in the Sanity management dashboard.
2. Find the Project ID on the project overview.
3. Click the copy icon and paste your Project ID into Serpy.

<img src="https://mintcdn.com/serpy/Lii5LXm84V_IdY6F/images/sanity-project-id.png?fit=max&auto=format&n=Lii5LXm84V_IdY6F&q=85&s=be6f602c36adc0ca8dc0fbe2d5ff58cb" alt="Copy the Sanity Project ID from the project overview" width="1662" height="946" data-path="images/sanity-project-id.png" />

**Choose your dataset:**

1. Open the Datasets tab in your Sanity project.
2. Find the dataset you want Serpy to publish to.
3. Enter or select that dataset in Serpy when prompted. The example below uses **production**; use your own dataset name.

<img src="https://mintcdn.com/serpy/Lii5LXm84V_IdY6F/images/sanity-dataset.png?fit=max&auto=format&n=Lii5LXm84V_IdY6F&q=85&s=5301b922dcfeea897b71c6a9312cca17" alt="Find the Sanity dataset name" width="1662" height="946" data-path="images/sanity-dataset.png" />

**Add your API token:**

1. Open the API tab in your Sanity project.
2. Under Tokens, choose Add API token.
3. Give the token a name, such as **Serpy publishing**.
4. Choose a role with permission to publish content, such as **Editor**.
5. Click Add token, then copy the generated token into the token field in Serpy.

<img src="https://mintcdn.com/serpy/Lii5LXm84V_IdY6F/images/sanity-api-token.png?fit=max&auto=format&n=Lii5LXm84V_IdY6F&q=85&s=ae9f80abb2ef6c12c13834761ca88bfc" alt="Create a Sanity API token with publishing permissions" width="1661" height="947" data-path="images/sanity-api-token.png" />

Choose the content type if prompted, save the connection, and test publishing with a draft article.

## Tips for Sanity

This integration is best for teams with a technical setup.

Make sure your Sanity schema supports the content fields Serpy sends.

Use a token with the correct permissions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.