Skip to content
Sanity
Get started
  • Sanity Studio - Flexible editing environment
  • Content Lake - Real-time database
  • Developer experience - Tooling you love
  • Structured content - The philosophy behind Sanity
  • Review changes - View edits & rollback instantly
  • Image pipeline - On-demand transformations
  • E-commerce - Better shopping experiences
  • Marketing sites - Control your story
  • Products & services - Innovate and automate
  • Mobile apps - Content backend for every OS
  • Aether - Unique digital shopping experience
  • Morning Brew - Omnichannel media distribution
  • InVision - Delivering exceptional customer experiences
  • DataStax - Personalization for global audience
  • React
  • Gatsby
  • Next
  • Nuxt
  • Eleventy
  • Netlify
  • Vercel
  • Algolia
  • Documentation
  • Reference
  • Guides
  • Resource library
  • Headless CMS
  • Tools & plugins
  • Project showcase
  • Schemas & snippets
  • Agency partners
  • Technology partners
  • Get support
  • Share your work
  • 5 Disadvantages Of Wordpress That Are Holding You Back
EnterprisePricing
Contact salesLog inGet started
DocumentationReference documentationClient librariesPHP
  • Overview
  • Getting started
    • Create a project
    • Create a schema
    • Create content
    • Connect content
    • What's next?
  • Sanity Studio
    • NEWSetup and deployment
      • Installation
      • Project structure
      • Development
      • Hosting and deployment
      • Environment variables
      • Embedding Sanity Studio
      • Using TypeScript
    • NEWConfiguration
      • Workspaces
      • Schemas and forms
      • Conditional Fields
      • Field Groups
      • List Previews
      • Connected Content
      • Validation
      • Initial Values
      • Shared Content
      • Sort Orders
    • NEWBlock Content
      • Configuring the Portable Text Editor
      • Customizing the Portable Text Editor
    • NEWCustomization
      • Component API
      • Studio Components
      • Form Components
      • Asset Sources
      • Theming and branding
      • Icons
      • Sanity UI
    • NEWWorkflows
      • Dashboard
      • Document Actions
      • Document Badges
      • Localization
      • Desk Structure
    • NEWTools
    • NEWPlugins
      • Installing plugins
      • Developing plugins
      • Publishing plugins
    • NEWCommand Line Interface
    • NEWMigrating 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 Action 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
    • Images & assets
      • Assets
      • Asset CDN
      • Presenting Images
    • API CDN
    • Drafts
    • Real-time
    • Webhooks
    • Datasets
      • Hot Swap
      • Cloud Clone
    • Updating content
      • Transactions
      • Migrating Data
    • IDs and paths
    • Importing data
    • Security
      • Browser security & CORS
      • Access Your Data (CORS)
      • Activity Feed
      • Keeping your data safe
    • Technical limits
      • Attribute limit
  • Build with Sanity
    • Previewing content in presentation
    • Onboarding stakeholders
    • Convince your team
    • Convince your clients
  • Access control
    • Roles
    • SAML SSO
    • Custom SSO
  • Reference
    • SANITY STUDIO
    • NEWConfiguration API
    • NEWSchema
      • 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
    • NEWPlugins
    • NEWTools
    • NEWForm
      • Components
      • Asset Source
    • NEWStudio Components
    • NEWDocument
      • Document Actions API
      • Document Badges API
    • NEWHistory experience
    • NEWDesk Tool
    • NEWTheme
    • NEWAuthentication
      • OAuth2
    • NEWStructure Builder
    • NEWStudio React Hooks
    • NEWCommand line interface
      • Build
      • Codemod
      • CORS
      • Dataset
      • Debug
      • Deploy
      • Dev
      • Docs
      • Documents
      • Exec
      • GraphQL
      • Help
      • Hook
      • Init
      • Install
      • Login
      • Logout
      • Manage
      • Preview
      • Projects
      • Start
      • Undeploy
      • Users
      • Versions
    • CONTENT LAKE
    • HTTP API
      • URL format
      • Authentication
      • Patches
      • Using JSONMatch
      • Endpoints
      • Scheduling API
      • Assets
      • Doc
      • Export
      • History
      • Listen
      • Mutate
      • Projects
      • Roles
      • Jobs
      • 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
    • 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

Page content

  • Requirements
  • Composer
  • Usage
    • Instantiating a new client
    • Using an authorization token
    • Specifying API version
    • Fetch a single document by ID
    • Performing queries
    • Creating documents
    • Creating a document (if it does not exist)
    • Replacing a document
    • Patch/update a document
    • Delete a document
    • Multiple mutations in a transaction
    • Clientless patches & transactions
    • Upload an image asset (from local file)
    • Upload an image asset (from a string)
    • Upload image, extract exif and palette data
    • Upload a file asset (from local file)
    • Upload a file asset (from a string)
    • Referencing an uploaded image/file
    • Upload image and append to array
    • Get client configuration
    • Set client configuration
    • Rendering block content
  • Contributing
  • License

Platform

Structured ContentDeveloper experienceContent LakeSanity StudioSecurity & 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

Documentation
  • React Blog
  • Gatsby Blog
  • Next.js Landing Pages
  • Progressive Web Application
  • Single Page Application
  • Svelte & Typescript App
  • Vue & Tailwind Blog
  • Developer Portfolio Templates
  • Form validation with Yup
  • Live Preview with Next.js and Sanity.io
Resource library
  • Agency partners
  • Technology partners
  • Blog Template
  • Personal Website Template
  • Developer Portfolio Templates
  • All Templates
Case Studies
  • Headless CMS
  • What is an API CMS
  • Static Sites 101
  • Headless SEO
  • Localization
  • GraphQL vs REST
  • What is a DXP?
  • Typescript 101
  • Content as a Service
  • Ecommerce SEO
  • React CMS
  • Next.JS CMS
  • CMS for Shopify
  • 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

Company

Contact SalesEnterpriseCareersTerms of ServiceAccessibility Statement

Stay connected

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