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 events with customizable filter expressions.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Webhook & Event Subscription Management BC-4270.80

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /hooks/projects/{projectId} List a project's webhooks · List Webhooks #
Ask an LLM
“Which webhooks are configured for my Sanity project?”
“Can I see every webhook URL set up for a dataset?”
Tell an agent
List the webhooks configured for project {projectId}.
Show all event webhooks set up in project {projectId}.
POST /hooks/projects/{projectId} Create a webhook for event notifications · Create Webhook #
Ask an LLM
“How do I get notified by webhooks when documents are deleted in Sanity?”
“Can I filter a webhook to only fire for certain changes?”
Tell an agent
Create a webhook named {name} on project {projectId} for {url} on dataset {dataset} that listens for {on}.
Set up webhook {name} at {url} on project {projectId} for dataset {dataset} to fire on {on} matching {filter} with secret {secret}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sanity:sanity-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sanity-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sanity HTTP Webhooks API
  description: The Sanity HTTP API provides access to the Sanity Content Lake platform, enabling querying, mutating, and managing structured content. The API supports GROQ queries, real-time event streaming, asset management, project management, webhooks, scheduling, and AI-powered content agents. Authentication uses Bearer tokens generated from Sanity project settings.
  version: v2024-01-01
  contact:
    name: Sanity Support
    url: https://www.sanity.io/docs
  license:
    name: Commercial
    url: https://www.sanity.io/legal/terms
servers:
- url: https://{projectId}.api.sanity.io/v{apiVersion}
  description: Sanity project-scoped API endpoint
  variables:
    projectId:
      description: Your Sanity project ID
      default: your-project-id
    apiVersion:
      description: API version date (YYYY-MM-DD)
      default: '2024-01-01'
- url: https://api.sanity.io/v{apiVersion}
  description: Sanity management API endpoint
  variables:
    apiVersion:
      description: API version date
      default: '2024-01-01'
security:
- BearerAuth: []
tags:
- name: Webhooks
  description: Event notification configuration
paths:
  /hooks/projects/{projectId}:
    get:
      operationId: listWebhooks
      summary: List Webhooks
      description: List all webhooks configured for a project.
      tags:
      - Webhooks
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: List of webhooks
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Webhook'
    post:
      operationId: createWebhook
      summary: Create Webhook
      description: Create a new webhook for event notifications.
      tags:
      - Webhooks
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookInput'
      responses:
        '201':
          description: Webhook created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
components:
  schemas:
    Webhook:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
          format: uri
        dataset:
          type: string
        filter:
          type: string
          description: GROQ filter expression
        projection:
          type: string
        'on':
          type: array
          items:
            type: string
        isDisabled:
          type: boolean
        createdAt:
          type: string
          format: date-time
    WebhookInput:
      type: object
      required:
      - name
      - url
      - dataset
      - 'on'
      properties:
        name:
          type: string
        url:
          type: string
          format: uri
        dataset:
          type: string
        filter:
          type: string
        projection:
          type: string
        'on':
          type: array
          items:
            type: string
            enum:
            - create
            - update
            - delete
        secret:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Sanity project API token