Where to start in RankAI
In your RankAI project, open Settings in the sidebar. Under Site Integration, find Connected CMS and click Configure. On the next screen, select Sanity to continue.Step 1: Get your Sanity project ID
Open your Sanity Dashboard and go to Organization Settings using Manage (top-left). Select the project you want to connect, then copy the Project ID shown near the top of the page.
Step 2: Find your dataset name
In the same Sanity project, open the Datasets tab and copy the dataset name you want RankAI to publish to (for example,production).

Step 3: Create an API token and add a CORS origin
RankAI needs an API token with write access and an approved CORS origin for publishing. Follow the steps below in your Sanity project settings.-
Go to API > Tokens > Add API token. Give it a name, set the permission to Developer or Editor, then copy the token.
Add a new API token in the Sanity API settings.
Configure the token name and select Developer or Editor permissions.
-
In API > CORS origins, click Add CORS origin and add your RankAI app URL (for example,
https://rankai.ai). Save your changes. Add a new CORS origin from the API settings.
Enter your RankAI app URL and save the CORS origin.
-
Paste the token into the Sanity API Access Token field in RankAI, then click Connect.
Enter your Sanity project ID, dataset name, and API token in RankAI.
Optional: Add the RankAI schema to Sanity Studio
RankAI publishes to a schema type calledRankAIBlogPosts. If you want to view the content in Sanity Studio, add the schema to your project:
- Download the schema file at https://rankai.ai/sanity/rankaiblog.txt (open the link in a new tab to download).
- Save it as
rankai.ts(orrankai.js) inside yourschemaTypesfolder.

schemaTypes/index.ts to include the RankAI schema.

npx sanity deploy).


FAQ
Which permissions should the API token have?
Use a token with Developer or Editor permissions so RankAI can create and publish documents.What schema does RankAI publish to?
RankAI publishes toRankAIBlogPosts. You can add the schema to Sanity Studio to view and manage content there.
Where can I get more support?
Contact your RankAI account team or check the help section in your dashboard.Install the technical SEO & AEO script
The CMS connection above handles articles. Follow the separate illustrated technical SEO & AEO setup to install the RankAI script.Last reviewed: October 12, 2026.