Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the History HTTP Endpoint, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fsanity.io%2Fsanity-history" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fsanity.io%2Fsanity-history" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with History HTTP Endpoint API.
Fetch a document as it was at a past timestamp with the time parameter
Retrieve a specific document revision by its revision ID, or the last state before deletion with lastRevision
List NDJSON transactions for a whole dataset between fromTime and toTime, with a limit
Get the transactions for a comma-separated list of document IDs to see who changed them and when
GET STARTED
Filter transactions by author IDs and return them in reverse order to see the newest first
Read change effects in the Mendoza format to reconstruct what each transaction did
Patterns agents use History HTTP Endpoint API for, with concrete tasks.
★ AI agent content audit
An agent asked 'who changed this page and what was it before?' needs Sanity's revision trail. Through Jentic it searches for 'get a past version of a Sanity document', loads the History revision operation, and requests the document at a timestamp while the Sanity token is injected at call time. It can then pull the document's transactions to name the authors and times of each change.
Call GET /data/history/production/documents/homepage with time '2026-11-10T09:00:00Z', then GET /data/history/production/transactions/homepage with excludeContent true and reverse true to list who changed it since
Restoring deleted or overwritten content
When an editor deletes or overwrites a document by mistake, the earlier content is still in its history. Requesting the document with lastRevision returns its final state before deletion, and a known revision ID returns exactly that version, ready to be written back through the Sanity mutation endpoints.
Call GET /data/history/production/documents/post-123 with lastRevision true and return the document body so it can be recreated
Change feed for reporting
Editorial teams want a record of what changed in a period. The dataset-wide transactions endpoint returns NDJSON entries between fromTime and toTime or between two transaction IDs, filtered by authors, with excludeContent set to true as the spec requires. A limit keeps responses small, which the spec strongly recommends.
Call GET /data/history/production/transactions with excludeContent true, fromTime '2026-11-01T00:00:00Z', toTime '2026-11-08T00:00:00Z', authors 'pDYrmFKn7', and limit 200
3 endpoints — the sanity history api returns past revisions of documents in a sanity dataset and the transactions that changed them.
METHOD
PATH
DESCRIPTION
/data/history/{dataset}/documents/{documentId}
Get a document revision
/data/history/{dataset}/transactions
Get transactions for all documents
/data/history/{dataset}/transactions/{documentIds}
Get transactions for listed documents
/data/history/{dataset}/documents/{documentId}
Get a document revision
/data/history/{dataset}/transactions
Get transactions for all documents
/data/history/{dataset}/transactions/{documentIds}
Get transactions for listed documents
What agents get from Jentic-routed access to this vendor.
Setup
Wiring the Sanity History API by hand means templating the projectId and apiVersion into the host, sending a bearer token with read access, remembering that excludeContent must be true on transaction calls, and parsing NDJSON responses. Through Jentic you install once, import it from the API Directory, store the token once, and your agent calls it.
Permission scoping
Sanity puts the dataset and document IDs in the URL path (/data/history/{dataset}/documents/{documentId}), so a rule can pin your agent to one dataset or even one document's history. Every operation is a read, and the token's own permissions decide which documents come back.
Credential isolation
Your Sanity token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'get a past version of a Sanity document' or 'list recent Sanity edits', and Jentic returns the matching History operation with its path and query parameters.
Alternatives and complements available in the Jentic catalogue.
Specific to using History HTTP Endpoint API through Jentic.
What authentication does the Sanity History API use?
Per its OpenAPI spec, the Sanity History API uses a bearer token (a JWT-format Sanity token) in the Authorization header. The spec notes you need read access to a document's current version to read its transactions, and authentication is required for documents in private datasets. Through Jentic the token is stored by your own instance and attached at call time.
Why does the Sanity History transactions request return 403?
The spec requires excludeContent to be true on both transactions endpoints. Transaction responses never include document contents, and requests without excludeContent=true, or with it set to false, are refused. Use the document revision endpoint when you need the content itself.
Can I see revisions a user could not access at the time?
The History API applies current access control to every revision. If a token can read the document today, it can read all previous revisions of that document, whatever the permissions were when they were written.
What are the rate limits for the Sanity History API?
The OpenAPI spec does not specify rate limits. Check the Sanity documentation at https://www.sanity.io/docs for current API limits for your plan, and pass limit on transaction requests as the spec recommends.
Is there a Sanity MCP server?
You don't need an MCP server to give your agent the Sanity History API. Jentic connects it directly from the API Directory: import it, store your Sanity token once, and your agent calls the revision and transaction operations with their input schemas when it needs them.
How do I get a past version of a Sanity document through Jentic?
Search Jentic for 'get a past version of a Sanity document', load the revision operation, and execute GET /data/history/{dataset}/documents/{documentId} with either time, revision, or lastRevision, since the three are mutually exclusive. To run it on your own infrastructure, install Jentic One from its GitHub repo.
Can I limit what my agent is allowed to do with the Sanity History API?
Yes. Write a rule that allows only the revision operation under /data/history/staging/documents/, and the agent can look up earlier versions of staging documents but cannot pull the transaction log or read production history. Every call it makes is logged.
For Agents
Fetch a Sanity document as it was at a past time or revision, and list the transactions that changed a dataset or specific documents, filtered by time, author, and transaction range.
Use for: Show me what the homepage document looked like last Tuesday, I need to recover the content of a document that was deleted, List all transactions on the production dataset from the last day, Find all changes a specific editor made this week
Not supported: Does not write, restore, or publish documents, and does not run GROQ queries. Use for reading past document revisions and transaction logs in a Sanity dataset only.
The Sanity History API returns past revisions of documents in a Sanity dataset and the transactions that changed them. A document can be fetched as it was at a given timestamp, at a specific revision ID, or at its last revision, which for a deleted document is its final state before deletion. Transaction logs come back as NDJSON for the whole dataset or for a comma-separated list of document IDs, filtered by time range, transaction range, and author IDs, with effects expressed in the Mendoza diff format. Access follows the document's current permissions, so anyone who can read a document today can read all of its earlier revisions.
This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.
Base layer of spec validity and structural soundness.
Aggregated quality score from linter diagnostics, weighted by severity.
Percentage of `$ref` references that resolve successfully.
Checks whether the API description parses successfully and conforms to its declared specification (e.g., OpenAPI).
Structural correctness score based on schema issues using logarithmic dampening.
Clarity, completeness, and ingestion readiness for developers and tooling.
How richly the API is illustrated with examples.
Percentage of examples that conform to their schemas.
Percentage of operations with complete response definitions (success, client error, server error).
Health of API ingestion, bundling, and resolution within Jentic pipelines.
Semantic breadth, depth, and agent comprehension for AI systems.
Coverage of descriptions across API elements.
Coverage of RFC 9457 Problem Details for error responses.
Coverage, uniqueness, and casing consistency of operationIds for AI inference.
Coverage of summaries across operations/tags/info.
Functional utility, complexity comfort, and AI orchestration readiness.
Agent comfort level based on API operational and structural complexity.
Trust, risk posture, and security compliance.
Average quality of security schemes based on authentication method strength (weakest link for OAuth2).
Findability, semantic richness, and reasoning readiness.
Clarity and depth of descriptions across API elements.
Score it yourself
Every API in the directory is allowlisted, so you can re-score it with no key required.
npx @jentic/api-scorecard-cli score <openapi-url>