Run a Zero query request
Executes a Zero protocol query batch against the server's registered queries on behalf of the authenticated user and returns the protocol response. Called by zero-cache rather than by integrations: the request must carry the Zero service key and a Clerk session with a synced profile, and a caller without the service key is rejected before Clerk or payload decoding runs.
Authorization
apiKey Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/zero/query"null{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}Read a file's metadata and download URL
Returns the stored file's name, MIME type, byte size, and a stable capability URL for its bytes. Treat that URL as a secret: anyone holding it can read the file until the access key is rotated. Requires a workspace API key with the `files:read` permission on the file's item; a file id that does not exist in the key's workspace is not found.
Apply a Zero mutation batch
Runs a Zero protocol mutation batch through the server-side mutators, each mutation inside its own transaction, and returns the protocol response; `schema` and `appID` identify the client's Zero app and are required. Called by zero-cache rather than by integrations: the request must carry the Zero service key and a Clerk session with a synced profile.