Before you start
- Admin or Developer role on the target Sanity project.
- Your document schema deployed to the dataset you plan to write to.
Generate an API token
- Go to sanity.io/manage and open your project.
- Open the API tab, then Tokens.
- Click Add API token.
- Name it
TPC publisherand pick Editor or Maintainer. - Copy the token. Sanity shows it only once.
Find your project ID and dataset
- Project ID is shown at the top of the project page in
sanity.io/manage. - Dataset is usually
production. Match the exact dataset name. - API version defaults to
v2025-03-01. Bump only if you need a newer feature.
Match your schema fields
TPC writes to a single document type. Defaults:- Document type —
post - Fields —
title,content,slug,excerpt - Image fields —
thumbnail,hero(optional)
Connect in TPC
- Open Settings → Integrations in your TPC product workspace.
- Select Sanity.
- Fill in project ID, dataset, API version, document type, field names, and the API token.
- Click Save, then Test connection.