Listen
The listen endpoint can be used to receive events whenever documents are modified. This endpoint follows the server-sent events protocol using the mime-type text/event-stream. The backend will hold the connection open and stream events as they occur for any documents matching the GROQ query.
In most cases, you should use the Live API instead for new projects.
Base API server URL
Sanity API base URL
https://{projectId}.api.sanity.io/{apiVersion}
Variables
- projectIdstringdefault:
"projectId"
Project ID
- apiVersionstringdefault:
"v2025-02-19"
API version