View document revision history by API

Hi community,

Is there any way to consult a document revision history with API.
I want to know for a specific document all version and the date related to.
It's to handle our terms and conditions revisions and make a link between them and what version a user validated.

Hi Guillaume,

Welcome to the Prismic forum, and thanks for posting :blush:

You cannot access document history via the API. With the API, you can access the current version, previews, and releases using refs. You can find more information on refs here and here.

You can browse your document's full revision history and visualize changes in each revision inside the Prismic Writing Room. Here's more information on how to do that.

If you want to track and monitor changes in your repo moving forward, one option might be to use Webhooks to send a POST when a document is changed. If you send the POST to a service like Zapier, you could add each version of your T&Cs to a Google Sheet to cross-reference with your CRM.

Alternatively, an easier option would be to republish your T&Cs each time there is a change, rather than editing the document, and showing the most recent version on your site. That way you would have the previous version with their published dates accessible in the API.

Please let me know if you have any other questions!

Best,
Sam

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Hi! Is it possible to check what changes were made by specific user in specific period of time?

Hello @VasiliiD,
Yes, it is possible to determine which users made what changes within a document thanks to the Version history. It is possible to view this from the UI of the documents. Read Compare versions to learn how to do this within your documents.

This thread has been closed due to inactivity. Flag to reopen.