Skip to content
Sanity
    • Platform

      Sanity Studio

      Flexible editing environment

      APIs

      Connect to anything

      Content Lake

      Real-time database

      Try product demo

      Features

      Real-time collaboration

      Fearlessly work with content

      Precise content querying

      Treat content as data with GROQ

      Localization

      Coherent messaging across territories

    • Use cases

      E-commerce

      Richer shopping experiences

      Marketing sites

      Control your story

      Products & services

      Innovate and automate

      Mobile apps

      Content backend for every OS

      View all

      Integrations

      Shopify
      Mux
      Vercel
      Netlify
      Algolia
      Cloudinary
      BigCommerce
      Commerce Layer
      Smartling
      Transifex
      View all
    • Learn

      Documentation
      Studio API Reference
      API reference
      Guides
      GROQ cheat sheet
      Sanity UI
      Get started

      Build and share

      Templates
      Tools and plugins
      Schemas and snippets
      Project showcase
      Share your work
      Browse Exchange

      Frameworks

      React
      Vue
      Next.js
      Nuxt.js
      Svelte
      Remix
      Gatsby
      Astro
      Angular
      Eleventy
      View all
    • Discover

      Blog
      Resource library
      Agency partners
      Become a partner
      Technical support
      Talk to sales

      Case studies

      Puma

      Source of truth for global markets

      Aether

      Unique digital shopping experience

      Morning Brew

      Omnichannel media distribution

      InVision

      Delivering exceptional customer experiences

      View all

      Popular guides

      Headless CMS
      Structured content
      Content modeling
      Headless SEO
      Static websites
      View all
    • Enterprise
    • Pricing
    • Log in
    • Contact sales
    • Get started
Contact salesGet started
DocumentationReference docsHTTP API
  • Overview
  • Getting started
    • Create a project
    • Create a schema
    • Create content
    • Connect content
    • What's next?
  • Sanity Studio
    • Setup and deployment
      • Installation
      • Project structure
      • Development
      • Hosting and deployment
      • Environment variables
      • Embedding Sanity Studio
      • Using TypeScript
    • Configuration
      • Workspaces
      • Schemas and forms
      • Conditional Fields
      • Field Groups
      • List Previews
      • Connected Content
      • Validation
      • Initial Values
      • Shared Content
      • Sort Orders
    • Block Content
      • Configuring the Portable Text Editor
      • Customizing the Portable Text Editor
    • NEWPreviewing content
    • NEWAI Assist
    • Customization
      • Component API
      • Studio Components
      • Form Components
      • How form paths work
      • Diff Components
      • Asset Sources
      • Theming and branding
      • Icons
      • Favicons
      • Sanity UI
      • Focus and UI state in custom inputs
      • From input components to real-time safe patches
    • Workflows
      • Dashboard
      • Document Actions
      • Document Badges
      • Localization
      • Desk Structure
    • Tools
    • Plugins
      • Installing plugins
      • Developing plugins
      • Publishing plugins
    • Command Line Interface
    • Migrating from v2
      • Migration Cheat Sheet
      • Step-by-step guide
      • Command Line Interface (CLI)
      • Studio configuration
      • Workspaces
      • Schema and schema types
      • Structure Builder
      • Initial Value Templates
      • New Document Templates
      • Production URL Resolver
      • Document Actions and Badges
      • Custom Auth Providers
      • Plugins
      • Custom Components
      • Tools
      • Environment variables
      • Styling and branding
  • Content Lake
    • API Versioning
    • Query language (GROQ)
      • How Queries Work
      • Query Cheat Sheet
      • GROQ Playground
      • High performance GROQ
      • Paginating with GROQ
    • GraphQL
      • GROQ and GraphQL
    • NEWPerspectives
    • Images & assets
      • Assets
      • Asset CDN
      • Presenting Images
    • API CDN
    • Real-time
    • NEWPresenting and previewing content
    • Drafts
    • Webhooks
    • NEWEmbeddings Index API
    • Datasets
      • Hot Swap
      • Cloud Clone
    • IDs and paths
    • Updating content
      • Transactions
      • Migrating Data
    • Importing data
    • Security
      • Browser security & CORS
      • Access Your Data (CORS)
      • Activity Feed
      • Keeping your data safe
    • Technical limits
      • Attribute limit
  • Build with Sanity
    • Onboarding stakeholders
    • Convince your team
    • Convince your clients
  • Access control
    • Roles
    • SAML SSO
    • Custom SSO
  • Reference
    • SANITY STUDIO
    • NEWStudio API Reference ↗
    • Configuration API
    • Schema
      • SCHEMA TYPES
      • Array
      • Block
      • Boolean
      • Cross Dataset Reference
      • Date
      • Datetime
      • Document
      • File
      • Geopoint
      • Image
      • Number
      • Object
      • Reference
      • Slug
      • String
      • Span
      • Text
      • URL
      • MISC
      • Initial Value Templates API
    • Plugins
    • Tools
    • Form
      • Components
      • Asset Source
    • Studio Components
    • Document
      • Document Actions API
      • Document Badges API
    • History experience
    • Desk Tool
    • Theme
    • Authentication
      • OAuth2
    • Structure Builder
    • Studio React Hooks
    • Command Line Interfaces
    • Sanity CLI
      • Build
      • Codemod
      • CORS
      • Dataset
      • Debug
      • Deploy
      • Dev
      • Docs
      • Documents
      • Exec
      • GraphQL
      • Help
      • Hook
      • Init
      • Install
      • Login
      • Logout
      • Manage
      • Preview
      • Projects
      • Start
      • Undeploy
      • Users
      • Versions
    • NEWEmbeddings Index CLI
    • CONTENT LAKE
    • HTTP API
      • URL format
      • Authentication
      • Patches
      • NEWContent Source Maps
      • Using JSONMatch
      • Endpoints
      • Assets
      • Doc
      • NEWEmbeddings Index
      • Export
      • Jobs
      • History
      • Listen
      • Mutate
      • Projects
      • Roles
      • Scheduling
      • Webhooks
      • Query
    • Query language (GROQ)
      • Syntax
      • Data Types
      • Parameters
      • Operators
      • Functions
      • Pipeline Components
      • Joins
    • Image transformations
      • Image Metadata
      • IIIF API reference
    • Integration
    • Client libraries
      • JavaScript
      • PHP
      • .NET
    • Portable Text
    • NEWVisual Editing
    • Project Management
    • NEWPlatform terminology
    • Projects, organizations, and billing
    • Plans and Payments
  • Studio v2 docs
    • Creating projects
      • Setting up with CLI
      • Starter projects
    • Configuration
      • Project Structure
      • sanity.json
      • Environment variables
    • Content modelling
      • Best practices
      • Naming things
      • Content types
    • Connected Content
      • Shared Content
    • Customization
      • Sanity UI
      • Styling
      • Preview / List View
      • Icons for data types
      • Sort orders
      • The parts system
      • Plugins
      • Custom input components
      • Custom asset sources
    • Block content
      • The rich text editor
      • Configuration
      • Customization
      • Previewing
      • Presenting Portable Text
    • Validation
    • Document history
      • Custom Diff Components
    • Dashboard
      • Introduction
      • Installing widgets
      • Create widgets
    • Structure Builder
      • Introduction to Structure Builder
      • Set up Structure Builder to override the default list view
      • Create a link to a single edit page in your main document type list
      • Manually group items in a pane
      • Dynamically group list items with a GROQ filter
      • Create custom document views with Structure Builder
    • Field Groups
    • Conditional fields
    • Initial Value Templates
    • Custom workflows
      • Document actions
      • Document badges
    • Presence API
    • Studio hosting
    • Preview in frontend
    • Localization
    • Drafts
    • Experimental Features
    • Spaces
    • Action UI affordances
    • Studio search config
    • Studio v2 Reference
      • Schema
      • Structure Builder Reference
      • Initial Value Templates API
      • [deprecated] Studio React hooks
      • Document Actions API
      • Document Badges API

HTTP API

The HTTP API contains all the endpoints for interacting with your data in an efficient and real-time way. You can use the HTTP API directly or through our client libraries.

URL Format

tl;dr: <projectId>.api.sanity.io/<version>/<path>

Authentication

How to submit authenticated requests.

Patches

The valid patch types when using the direct HTTP mutations api.

Content Source Maps

Fetch content source metadata with your GROQ queries

Using JSONMatch

Rich ways to address specific values in Sanity.io documents

Resources

Endpoints

  • Assets
  • Doc
  • Export
  • History
  • Listen
  • Mutate
  • Projects
  • Query
  • Webhooks

Client Libraries

  • JavaScript
  • PHP
  • .NET

Product

Sanity StudioAPIsContent LakeSecurity & Compliance
  • Sanity vs Contentful
  • Sanity vs Strapi
  • Sanity vs Wordpress
  • Sanity vs Adobe Experience Manager
  • Sanity vs Hygraph
  • Sanity vs Sitecore
  • Sanity vs Storyblok
  • Sanity vs Contentstack
  • Sanity vs Prismic
  • Sanity vs Drupal
  • Sanity vs ButterCMS

Resources

DocumentationBlogResource libraryCase Studies
  • React Blog
  • Gatsby Blog
  • Next.js Landing Pages
  • Making a PWA
  • Single Page Application
  • Svelte & Typescript App
  • Vue & Tailwind Blog
  • Developer Portfolio Templates
  • Form validation with Yup
  • Live Preview with Next.js and Sanity.io
  • Next.js blog
  • Next.js personal website
  • Clean Next.js + Sanity app
  • Clean Remix + Sanity app
  • Clean SvelteKit + Sanity app
  • All Templates
  • Agency partners
  • Technology partners
  • Headless CMS 101
  • Static Sites 101
  • Headless Commerce 101
  • CMS for enterprise
  • Headless SEO
  • Localization
  • Content as a Service
  • What is a DXP?
  • Typescript 101
  • Ecommerce SEO
  • What is a Composable DXP?
  • What is an API?
  • GraphQL vs REST
  • React CMS
  • Next.JS CMS
  • CMS for Shopify
  • API-first CMS
  • Content platform
  • Multilingual CMS
  • Static Site CMS
  • Gatsby CMS
  • Node CMS
  • E-commerce CMS
  • Vue CMS
  • Angular CMS
  • GraphQL CMS
  • Newspaper CMS
  • Magazine CMS
  • CMS for apps
  • Remix CMS
  • Nuxt CMS
  • SvelteKit CMS
  • Agile CMS
  • Eleventy CMS

Company

Contact SalesEnterpriseCareersTerms of ServicePrivacy PolicyAccessibility Statement

Stay connected

  • GitHub
  • Slack
  • Twitter
  • YouTube
  • Stack Overflow
  • Blog RSS
  • Newsletter
©Sanity 2023