---
title: "Compare two versions"
method: GET
path: "/v1/diagrams/{id}/compare"
tags: ["Diagrams"]
---

# Compare two versions

`GET /v1/diagrams/{id}/compare`

## Request

- Base URL: `https://api.zindex.ai`
- URL: `https://api.zindex.ai/v1/diagrams/{id}/compare`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

What changed between two versions. from and to are revision numbers or dates; to defaults to the latest.

## Path parameters

- `id` string, required

## Query parameters

- `from` string, required
- `to` string

## Response `200`

{ id, from, to, added, changed, removed, scene, authors } with element IDs, and scene-level fields that changed. authors lists each distinct { by, client } that saved a version after from up to to, with by as in the history

## Other responses

- `400`: INVALID_REQUEST: from is missing, or from or to is neither a revision number (1 or more) nor a date; error names which
- `401`: Missing or invalid API key. Response includes a `code` field that distinguishes the failure mode so clients (dashboard, MCP server) can render actionable copy: `AUTH_REQUIRED` (no key or session was sent), `API_KEY_INVALID` (key not found), `API_KEY_REVOKED` (key was revoked, or its person is no longer in its workspace), `API_KEY_EXPIRED` (key passed its expires_at), and for the site's session cookie `SESSION_EXPIRED` (past its 24 hours), `SESSION_REVOKED` (the account's sessions were ended, for example by a password reset) and `SESSION_INVALID` (not a session this server signed).
- `404`: NOT_FOUND or NO_REVISION_AS_OF
- `429`: RATE_LIMITED: over the request rate limit (see Rate Limiting). Wait retryAfter seconds (also the Retry-After header), then try again.

## Changes

- **2026-10-20** `1d21bd5bbf8e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zindex/apis/zindex-api/changes/v1/diagrams/:id/compare/get.md)

---

[API](https://skmtc.dev/zindex/apis/zindex-api.md) · [All operations](https://skmtc.dev/zindex/apis/zindex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zindex/apis/zindex-api/revisions/1d21bd5bbf8e?raw)
