---
title: "Compare two revisions."
method: GET
path: "/revisions/compare"
tags: ["Change History"]
---

# Compare two revisions.

`GET /revisions/compare`

Compare two revisions of the same entity. Returns the full revision records including snapshots for both the current and target revisions.

## Query parameters

- `current` integer, required
- `target` integer, required
- `project_id` integer, required

## Response `200`

Returns the two revision records for comparison.

- CompareRevisionResponse
  - `current` FullRevision
    - `account_id` integer — ID of the account.
    - `change_type` 'archive' | 'create' | 'update' | 'delete' | 'publish' — Action performed on the entity.
    - `entity_id` integer — ID of the entity.
    - `entity_type` string — The entity type as defined by public API.
    - `id` integer — ID of the revision.
    - `project_id` integer — ID of the project related to the entity.
    - `sequence_number` integer — Auto-generated number assigned to the revision when the entity was modified.
    - `snapshot` object — The full state of the entity at this revision.
    - `source` 'ui' | 'api' — Origin of the revision.
    - `update_time` string, date-time — The time when the entity was modified. Format is ISO 8601.
    - `user` User
      - `display_name` string, nullable — Display name of the user, most commonly the Optimizely user's email.
      - `email` string, required — Email of the user.
      - `first_name` string, nullable — First name of the user.
      - `id` string, required — ID of the user.
      - `last_name` string, nullable — Last name of the user.
      - `profile_image_url` string, nullable — URL to the user profile image.
    - `user_showable` boolean — Indicates if the revision should be exposed to the user.
  - `target` FullRevision
    - `account_id` integer — ID of the account.
    - `change_type` 'archive' | 'create' | 'update' | 'delete' | 'publish' — Action performed on the entity.
    - `entity_id` integer — ID of the entity.
    - `entity_type` string — The entity type as defined by public API.
    - `id` integer — ID of the revision.
    - `project_id` integer — ID of the project related to the entity.
    - `sequence_number` integer — Auto-generated number assigned to the revision when the entity was modified.
    - `snapshot` object — The full state of the entity at this revision.
    - `source` 'ui' | 'api' — Origin of the revision.
    - `update_time` string, date-time — The time when the entity was modified. Format is ISO 8601.
    - `user` User
      - `display_name` string, nullable — Display name of the user, most commonly the Optimizely user's email.
      - `email` string, required — Email of the user.
      - `first_name` string, nullable — First name of the user.
      - `id` string, required — ID of the user.
      - `last_name` string, nullable — Last name of the user.
      - `profile_image_url` string, nullable — URL to the user profile image.
    - `user_showable` boolean — Indicates if the revision should be exposed to the user.

## Other responses

- `400` — Revisions do not belong to the same entity.
- `404` — One or both revisions not found, or do not belong to the specified project.

---

[API](https://skmtc.dev/optimizely/apis/optimizely-api.md) · [All operations](https://skmtc.dev/optimizely/apis/optimizely-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/optimizely/optimizely-api/revisions/5151fe6a2297/schema)
