Skip to content

Reference

Content API

Your front end can read the history too. It can show a past version, or show what changed between two versions on a public “changes” page. The API is read-only and closed by default.

1. Open it for a content type

  1. Go to Settings → Content types.
  2. In the row of the content type, choose Content API: Published versions or All saved versions.
  3. Save.
ModeWhat the API returns
ClosedNothing. The content type answers like one that does not exist (404).
Published versionsThe versions that were published. A content type without draft & publish goes live at every save, so there it means every saved version.
All saved versionsEvery saved version, drafts included.

In every mode, autosaves (work in progress) and trash snapshots are never returned.

2. Create a token

In Settings → API Tokens, create a Custom token. Under Revisionary → versions, tick the actions you need: list, get, compare. You can also grant these actions to a role of the Users & Permissions plugin.

3. Call it

RequestReturns
GET /api/revisionary/versions?contentType=articles&documentId=…&locale=frThe versions of an entry, newest first. Use page and pageSize (100 at most) to paginate.
GET /api/revisionary/versions/:idOne version in the same shape as a REST document. Media and relations are populated, and components and dynamic zones are included.
GET /api/revisionary/compare?from=:id&to=:idThe fields that changed between two versions of the same entry. Text fields include word-level differences.

For contentType, you can pass the uid (api::article.article), the singular name or the plural name.

bash
curl -H "Authorization: Bearer $REVISIONARY_API_TOKEN" \
  "https://cms.example.com/api/revisionary/versions?contentType=articles&documentId=x8k2m4p1&locale=en"
json
{
  "data": [
    {
      "id": 412,
      "label": "v7",
      "name": "Approved by legal",
      "state": "published",
      "locale": "en",
      "title": "ISO 9001 guide",
      "createdAt": "2026-10-01T10:00:00.000Z",
      "changes": { "added": 0, "modified": 2, "removed": 0, "fields": ["title", "body"] }
    }
  ],
  "meta": { "contentType": "api::article.article", "documentId": "x8k2m4p1", "locale": "en",
            "pagination": { "page": 1, "pageSize": 25, "pageCount": 1, "total": 1 } }
}

In a Next.js server component, the token stays on the server:

js
const res = await fetch(
  process.env.STRAPI_URL + '/api/revisionary/compare?from=' + from + '&to=' + to,
  { headers: { Authorization: 'Bearer ' + process.env.REVISIONARY_API_TOKEN }, cache: 'no-store' },
);
const { data } = await res.json();
// data.changes: [{ field, type, change: 'added' | 'modified' | 'removed', before, after, text? }]
// text: [{ op: 'equal' | 'insert' | 'delete', text }] — show inserts in green and deletes struck through.

What the API never returns

  • Private fields, passwords and the fields you excluded from versioning.
  • Who made a change, their IP address and internal notes. A version only says what changed.
  • Related content that the token cannot read. Strapi’s own sanitizer runs on every response.
Was this page helpful?
Updated 1 November 2026