# Sanity

Frase’s [Sanity](https://www.sanity.io/) integration lets you send content directly into your Sanity CMS without manual copying, formatting, or rework.

### How to Connect to Sanity

#### Step 1: Open Your Sanity Project

1. Log into [Sanity Studio](https://www.sanity.io/studio) and view your Organization Settings
2. Open the project you want to connect to Frase
3. From the main project view, go to the *API* tab

{% hint style="info" %}
In Sanity, a "project" represents a single site you manage. You may have one or several.
{% endhint %}

#### Step 2: Copy API Token & Project ID

<figure><img src="/files/G4tDwr48lx9PaGdMxihG" alt=""><figcaption></figcaption></figure>

1. In the *API* tab, scroll to *Tokens*
2. Click **Add API token**
3. Name the token (for example: *Frase Integration*)
4. Set permissions to *Read + Write*
5. Save the token. Once created, Sanity will generate a token value. Copy this — you’ll paste it into Frase in the next step.
6. In the same *API* section of your Sanity project, locate your *Project ID* (at the top of your Project).

#### Step 3: Connect Sanity in Frase

<figure><img src="/files/HGhJy9hS1r8MsCvXgvmX" alt=""><figcaption></figcaption></figure>

1. Log into [Frase](https://next.frase.io)&#x20;
2. Go to **Settings → Integrations**
3. Under *CMS Publishing*, select **Sanity**
4. Paste in:
   * Your API Token
   * Your Project ID
5. Choose the document type to publish to (most choose *Post*)
6. Save and connect

<figure><img src="/files/s6V65qSDBJwT9973p50W" alt=""><figcaption></figcaption></figure>

#### Step 4 *(OPTIONAL)*: Set Up Public URL Template

Create a public URL template to tell Frase where your published content lives on your site, so it can connect each CMS document to its live URL.

**What this affects**

* [**Content Guard**](/integrations/cms-publishing/frase-cms.md) — Frase can't monitor a published article for ranking drops without knowing its live URL.
* [**GSC performance**](/integrations/connectors/google-search-console.md) — Clicks, impressions, and position data won't link back to specific content pieces in your library.
* **Republish flow** — The "accept and republish" action needs the live URL to push updates to the correct CMS document.
* **Content health** — Stale content detection and decay alerts rely on matching CMS posts to their live URLs.

**Format**

If your blog posts live at `https://yoursite.com/blog/my-post-slug`, set your template to:

`https://yoursite.com/blog/{slug}`

The `{slug}` placeholder is replaced with each document's actual slug field at sync time.

{% hint style="danger" %}
Without a public URL template, Frase treats your content as **untracked**. You can still create and publish, but all performance monitoring and GSC-linked features will be unavailable.
{% endhint %}

### Publishing Content to Sanity

After connecting, you'll be able to:

* Create and optimize content in Frase
* Choose Sanity as your article publishing destination
* Send the content as a draft or published entry
* Open Sanity Studio to review, edit, or finalize

<div align="left"><figure><img src="/files/eWnXtgNPaXBkrACl1T4E" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}
**Important:** Some Sanity fields, such as "Publish Date" or others customized by your CMS instance, are mandatory and must be updated in Sanity *after* pushing the content to Frase.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.frase.io/integrations/cms-publishing/sanity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
