Sanity
communityReal-time headless CMS with structured content, GROQ query language, and collaborative editing.
This is a community-generated spec
This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.
GET
https://{project_id}.api.sanity.io/v2021-10-21/data/query/{dataset}Query content with GROQ
Parameters
queryGROQ query string (stringrequiredReturns
result[] with _id, _type, and projected fields based on queryGET
https://{project_id}.api.sanity.io/v2021-10-21/data/doc/{dataset}/{document_id}Get document by ID
Parameters
document_iddocument ID (stringrequiredReturns
documents[] with _id, _type, _rev, _createdAt, _updatedAt, and content fieldsPOST
https://{project_id}.api.sanity.io/v2021-10-21/data/mutate/{dataset}Create, update, or delete documents
Parameters
mutationsarray of create/createOrReplace/patch/delete operations (arrayrequiredReturns
transactionId, results[] with id, operation