Sanity logo

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.

9 APIs 0 Features
Headless CMSContent ManagementGROQReal-TimeStructured ContentDeveloper Platform

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...

Event 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

Semantic Vocabularies

Sanity Context

0 classes · 12 properties

JSON-LD

API Governance Rules

Sanity API Rules

7 rules · 3 errors 4 warnings

SPECTRAL

Resources

🔗
ArazzoWorkflows
ArazzoWorkflows
🔗
LinkedIn
LinkedIn
🔗
Website
Website
🔗
Documentation
Documentation
🔗
HTTP API Reference
HTTP API Reference
🌐
Developer Portal
Developer Portal
👥
GitHubOrganization
GitHubOrganization
🚀
GettingStarted
GettingStarted
📦
JavaScript SDK
JavaScript SDK
💰
Pricing
Pricing
🔗
Community
Community
📰
Blog
Blog
🟢
StatusPage
StatusPage
🔗
Vocabulary
Vocabulary
🔗
SpectralRules
SpectralRules
🔗
Capabilities
Capabilities
🔗
JSONLD
JSONLD
🔗
MCPServer
MCPServer
🔗
AgentSkill
AgentSkill

Sources

Raw ↑
aid: sanity
name: Sanity
description: >-
  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.
type: Index
image: https://kinlane-images.s3.amazonaws.com/shared/apis-json/apis-json-logo.jpg
tags:
  - Headless CMS
  - Content Management
  - GROQ
  - Real-Time
  - Structured Content
  - Developer Platform
created: '2026-05-02'
modified: '2026-05-30'
x-profiled: 2026-05
url: https://raw.githubusercontent.com/api-evangelist/sanity/refs/heads/main/apis.yml
specificationVersion: '0.19'
apis:
  - aid: sanity:sanity-query-api
    name: Sanity Query API
    description: >-
      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. Available at both the standard API endpoint and
      a CDN endpoint for edge-cached results. Supports perspectives (drafts, published), result source maps, and query
      explain functionality.
    humanURL: https://www.sanity.io/docs/http-query
    tags:
      - GROQ
      - Query
      - Content Lake
      - CDN
    properties:
      - type: Documentation
        url: https://www.sanity.io/docs/http-query
      - type: OpenAPI
        url: https://raw.githubusercontent.com/api-evangelist/sanity/refs/heads/main/openapi/sanity-openapi.yml
      - type: JSONSchema
        url: json-schema/sanity-document-schema.json
      - type: JSONSchema
        url: json-schema/sanity-webhook-schema.json
  - aid: sanity:sanity-mutation-api
    name: Sanity Mutation API
    description: >-
      The Sanity Mutation API enables creating, updating, patching, and deleting documents in Content Lake. Mutations
      are submitted as arrays of operations (create, createOrReplace, createIfNotExists, patch, delete) against a
      dataset endpoint.
    humanURL: https://www.sanity.io/docs/http-reference
    tags:
      - Mutation
      - Documents
      - CRUD
      - Content Lake
    properties:
      - type: Documentation
        url: https://www.sanity.io/docs/http-reference
  - aid: sanity:sanity-assets-api
    name: Sanity Assets API
    description: >-
      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.
    humanURL: https://www.sanity.io/docs/http-reference
    tags:
      - Assets
      - Images
      - Files
      - Upload
    properties:
      - type: Documentation
        url: https://www.sanity.io/docs/http-reference
  - aid: sanity:sanity-projects-api
    name: Sanity Projects API
    description: >-
      The Sanity Projects API enables programmatic management of Sanity projects including creating projects, managing
      datasets, configuring CORS origins, managing access tokens, and checking user permissions. Authentication uses
      Bearer tokens.
    humanURL: https://www.sanity.io/docs/projects-api
    tags:
      - Projects
      - Datasets
      - Access Control
      - Tokens
    properties:
      - type: Documentation
        url: https://www.sanity.io/docs/projects-api
  - aid: sanity:sanity-webhooks-api
    name: Sanity Webhooks API
    description: >-
      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 events with customizable filter expressions.
    humanURL: https://www.sanity.io/docs/http-reference
    tags:
      - Webhooks
      - Events
      - Notifications
      - Real-Time
    properties:
      - type: Documentation
        url: https://www.sanity.io/docs/http-reference
      - type: Documentation
        url: https://www.sanity.io/docs/webhooks
      - type: AsyncAPI
        url: https://raw.githubusercontent.com/api-evangelist/sanity/refs/heads/main/asyncapi/sanity-webhooks-asyncapi.yml
  - aid: sanity:sanity-listen-api
    name: Sanity Listen API
    description: >-
      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-time notifications when matching documents change.
    humanURL: https://www.sanity.io/docs/http-reference
    tags:
      - Real-Time
      - SSE
      - Events
      - Streaming
    properties:
      - type: Documentation
        url: https://www.sanity.io/docs/http-reference
  - aid: sanity:sanity-roles-api
    name: Sanity Roles API
    description: >-
      The Sanity Roles API provides endpoints for managing user roles and permissions within Sanity projects. Supports
      predefined roles (Administrator, Read+Write, Read, Viewer) and custom role management.
    humanURL: https://www.sanity.io/docs/roles-reference
    tags:
      - Roles
      - Permissions
      - Access Control
      - Security
    properties:
      - type: Documentation
        url: https://www.sanity.io/docs/roles-reference
  - aid: sanity:sanity-scheduling-api
    name: Sanity Scheduling API
    description: >-
      The Sanity Scheduling API enables scheduling content for future publication or unpublication at specific times,
      supporting editorial workflows and content calendars.
    humanURL: https://www.sanity.io/docs/http-reference
    tags:
      - Scheduling
      - Publishing
      - Content Calendar
      - Workflow
    properties:
      - type: Documentation
        url: https://www.sanity.io/docs/http-reference
  - aid: sanity:sanity-embeddings-index-api
    name: Sanity Embeddings Index API
    description: >-
      The Sanity Embeddings Index API enables creating and managing vector embedding indexes for Content Lake documents,
      supporting semantic search and AI-powered content retrieval workflows.
    humanURL: https://www.sanity.io/docs/http-reference
    tags:
      - Embeddings
      - Vector Search
      - AI
      - Semantic Search
    properties:
      - type: Documentation
        url: https://www.sanity.io/docs/http-reference
common:
  - type: ArazzoWorkflows
    url: arazzo/
    workflows:
      - url: arazzo/sanity-bootstrap-project-workflow.yml
        name: Sanity Bootstrap Project
        summary: Create a project, add an initial dataset, then list the project datasets.
      - url: arazzo/sanity-bulk-delete-by-query-workflow.yml
        name: Sanity Bulk Delete by Query
        summary: Count documents matching a GROQ filter, then delete them in one mutation.
      - url: arazzo/sanity-compare-draft-and-published-workflow.yml
        name: Sanity Compare Draft and Published
        summary: Read a document's draft and published perspectives to inspect its history.
      - url: arazzo/sanity-create-and-verify-document-workflow.yml
        name: Sanity Create and Verify Document
        summary: Create a document with a mutation, then confirm it exists with a GROQ query.
      - url: arazzo/sanity-discover-project-datasets-workflow.yml
        name: Sanity Discover Project Datasets
        summary: List accessible projects, then enumerate the datasets of a chosen project.
      - url: arazzo/sanity-issue-token-for-project-workflow.yml
        name: Sanity Issue Token for Project
        summary: Confirm a project exists, mint an API token on it, then list its tokens.
      - url: arazzo/sanity-provision-dataset-workflow.yml
        name: Sanity Provision Dataset
        summary: Create a dataset in a project, then list datasets to confirm it exists.
      - url: arazzo/sanity-publish-draft-document-workflow.yml
        name: Sanity Publish Draft Document
        summary: Read a draft, promote it to a published document, then verify the result.
      - url: arazzo/sanity-query-then-patch-document-workflow.yml
        name: Sanity Query Then Patch Document
        summary: Find a document with GROQ, then patch it when a match is found.
      - url: arazzo/sanity-register-webhook-for-query-workflow.yml
        name: Sanity Register Webhook for Query
        summary: Validate a GROQ filter, register a webhook on it, then list webhooks.
      - url: arazzo/sanity-rename-project-workflow.yml
        name: Sanity Rename Project
        summary: Read a project, update its display name and metadata, then re-read it.
      - url: arazzo/sanity-replace-document-asset-workflow.yml
        name: Sanity Replace Document Asset
        summary: Upload a new image, find the target document, then point it at the new asset.
      - url: arazzo/sanity-upload-asset-and-reference-workflow.yml
        name: Sanity Upload Asset and Reference
        summary: Upload an image asset, then create a document that references it.
      - url: arazzo/sanity-upsert-document-workflow.yml
        name: Sanity Upsert Document
        summary: Find a document by a GROQ key match and patch it, otherwise create it.
  - type: LinkedIn
    url: https://www.linkedin.com/company/sanity-io
  - type: Website
    url: https://www.sanity.io
  - type: Documentation
    url: https://www.sanity.io/docs
  - type: HTTP API Reference
    url: https://www.sanity.io/docs/http-reference
  - type: Developer Portal
    url: https://www.sanity.io/docs
  - type: GitHubOrganization
    url: https://github.com/sanity-io
  - type: GettingStarted
    url: https://www.sanity.io/docs/getting-started-with-sanity
  - type: JavaScript SDK
    url: https://www.npmjs.com/package/@sanity/client
  - type: Pricing
    url: https://www.sanity.io/pricing
  - type: Community
    url: https://slack.sanity.io
  - type: Blog
    url: https://www.sanity.io/blog
  - type: StatusPage
    url: https://status.sanity.io
  - type: Vocabulary
    url: vocabulary/sanity-vocabulary.yml
  - type: SpectralRules
    url: rules/sanity-rules.yml
  - type: Capabilities
    url: capabilities/content-management.yaml
  - type: JSONLD
    url: json-ld/sanity-context.jsonld
  - name: MCP Server
    url: https://github.com/sanity-io/sanity-mcp-server
    type: MCPServer
  - name: Agent Skills
    url: https://www.sanity.io/blog/introducing-sanity-agent-skills
    type: AgentSkill
maintainers:
  - FN: Kin Lane
    email: kin@apievangelist.com