---
title: "Diff two versions"
method: GET
path: "/agent/{id}/versions/diff"
tags: ["Agent Versioning - Versions"]
deprecated: true
---

# Diff two versions

`GET /agent/{id}/versions/diff`

> **Deprecated.**

**Deprecated.** Kept working during the v1 coexistence window (~1 month). Migrate to `GET /agent/{id}/diff?a=<revisionId>&b=<revisionId>`. Will be removed at the sunset date.

Compare two version or draft revision records side-by-side by their IDs. The implementation tries published versions first and can fall back to the latest draft revision.

## Path parameters

- `id` string, required

## Query parameters

- `versionA` string, required
- `versionB` string, required

## Response `200`

Diff returned successfully

- object
  - `status` boolean
  - `data` AgentVersionDiff — Section-by-section diff between two version or draft revision records.
    - `unchangedSections` string[] — Config sections that did not change.
    - `diffs` object[] — Config sections with one or more changes.
      - `section` string — Config section name.
      - `changes` object[]
        - `path` string — Path to the changed value within the section.
        - `oldValue` union — Previous value. Can be any JSON value or null.
          - string
          - number
          - boolean
          - object
          - unknown[]
            - unknown
        - `newValue` union — New value. Can be any JSON value or null.
          - string
          - number
          - boolean
          - object
          - unknown[]
            - unknown

## Other responses

- `400` — Invalid input
- `401` — Unauthorized access
- `403` — Forbidden. Returned for workflow_graph agents when the organization lacks conversational agents access.
- `404` — Agent or version not found
- `500` — Internal server error

---

[API](https://skmtc.net/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.net/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/versions/6d1036a76fbc/schema)
