Sanity
Sanity is a composable content platform providing a headless CMS with a real-time collaborative editor (Sanity Studio) and a powerful HTTP API for managing structured content. The Sanity Content Lake stores content as flexible documents queryable via GROQ (Graph-Relational Object Queries). Key API capabilities include document querying, mutations, real-time listening, asset management, project management, webhooks, scheduling, roles and permissions, vector embeddings, and AI-powered content agents.
APIs
Sanity Query API
The Sanity Query API enables querying Content Lake documents using GROQ (Graph-Relational Object Queries). Supports GET for queries under 11 KB and POST for larger queries. Avai...
Sanity Mutation API
The Sanity Mutation API enables creating, updating, patching, and deleting documents in Content Lake. Mutations are submitted as arrays of operations (create, createOrReplace, c...
Sanity Assets API
The Sanity Assets API handles uploading, retrieving, and managing file and image assets in Content Lake. Assets are stored as documents and referenced from content documents.
Sanity Projects API
The Sanity Projects API enables programmatic management of Sanity projects including creating projects, managing datasets, configuring CORS origins, managing access tokens, and ...
Sanity Webhooks API
The Sanity Webhooks API enables configuring event-driven notifications for content changes. Webhooks can be created to trigger on document create, update, delete, and publish ev...
Sanity Listen API
The Sanity Listen API provides real-time event streaming via Server-Sent Events (SSE) for content changes in a dataset. Clients can subscribe to a GROQ query and receive real-ti...
Sanity Roles API
The Sanity Roles API provides endpoints for managing user roles and permissions within Sanity projects. Supports predefined roles (Administrator, Read+Write, Read, Viewer) and c...
Sanity Scheduling API
The Sanity Scheduling API enables scheduling content for future publication or unpublication at specific times, supporting editorial workflows and content calendars.
Sanity Embeddings Index API
The Sanity Embeddings Index API enables creating and managing vector embedding indexes for Content Lake documents, supporting semantic search and AI-powered content retrieval wo...
Collections
Sanity HTTP API
OPENArazzo Workflows
Sanity Bootstrap Project
Create a project, add an initial dataset, then list the project datasets.
ARAZZOSanity Bulk Delete by Query
Count documents matching a GROQ filter, then delete them in one mutation.
ARAZZOSanity Compare Draft and Published
Read a document's draft and published perspectives to inspect its history.
ARAZZOSanity Create and Verify Document
Create a document with a mutation, then confirm it exists with a GROQ query.
ARAZZOSanity Discover Project Datasets
List accessible projects, then enumerate the datasets of a chosen project.
ARAZZOSanity Issue Token for Project
Confirm a project exists, mint an API token on it, then list its tokens.
ARAZZOSanity Provision Dataset
Create a dataset in a project, then list datasets to confirm it exists.
ARAZZOSanity Publish Draft Document
Read a draft, promote it to a published document, then verify the result.
ARAZZOSanity Query Then Patch Document
Find a document with GROQ, then patch it when a match is found.
ARAZZOSanity Register Webhook for Query
Validate a GROQ filter, register a webhook on it, then list webhooks.
ARAZZOSanity Replace Document Asset
Upload a new image, find the target document, then point it at the new asset.
ARAZZOSanity Upload Asset and Reference
Upload an image asset, then create a document that references it.
ARAZZOSanity Upsert Document
Find a document by a GROQ key match and patch it, otherwise create it.
ARAZZOGraphQL
Sanity GraphQL API
Sanity provides a project-scoped GraphQL API that exposes Content Lake documents as a typed, queryable schema. The API is deployed per-project and per-dataset: you generate and ...
GRAPHQLPricing Plans
Rate Limits
FinOps
Sanity Finops
FINOPSEvent Specifications
Sanity GROQ-Powered Webhooks
AsyncAPI specification for Sanity's GROQ-powered webhook surface. Sanity delivers event-driven HTTP callbacks when documents in a Content Lake dataset are created, updated, or d...
ASYNCAPI