---
title: "Get draft diff"
method: GET
path: "/agent/{id}/drafts/{draftId}/diff"
tags: ["Agent Versioning - Drafts"]
---

# Get draft diff

`GET /agent/{id}/drafts/{draftId}/diff`

Compare a draft against its source version or another specified version.

## Path parameters

- `id` string, required
- `draftId` string, required

## Query parameters

- `compareTo` string

## Response `200`

Diff returned successfully

- object
  - `status` boolean
  - `data` object — Section-by-section diff between the draft and the comparison target

## Other responses

- `400` — Invalid input
- `401` — Unauthorized access
- `403` — Forbidden access
- `404` — Agent or draft not found
- `500` — Internal server error

## Changes

- **2026-05-26** `5a6b4e19f353` — 2 info
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`
- **2026-04-20** `801f1d220d57` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/smallest-inc/apis/agent-management-api/changes/agent/:id/drafts/:draftId/diff/get.md)

---

[API](https://skmtc.dev/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.dev/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/revisions/ea4ea58d7c4e/schema)
