---
title: "Compare the given AsyncAPI documents."
method: POST
path: "/diff"
tags: ["diff", "differ"]
---

# Compare the given AsyncAPI documents.

`POST /diff`

## Request body

- DiffRequest
  - `asyncapis` AsyncAPIDocument[], required
    - union — AsyncAPI document in JSON or YAML.
      - string
      - 200Json — unresolved $ref
      - 210Json — unresolved $ref
      - 220Json — unresolved $ref
      - 230Json — unresolved $ref
      - 240Json — unresolved $ref
      - 250Json — unresolved $ref
      - 260Json — unresolved $ref
      - 300Json — unresolved $ref
      - 310Json — unresolved $ref

## Response `200`

Successfully received changes between two AsyncAPI documents.

- DiffResponse
  - `diff` union — The diff between the two AsyncAPI documents.
    - object
    - string

## Other responses

- `400` — One of the AsyncAPI documents is not valid.
- `422` — Failed to retrieve changes between two AsyncAPI documents due to invalid parameters.
- `default` — Unexpected problem.

## Changes

- **2026-07-17** `4e4c84b02d25` — 1 info
  - added `#/components/schemas/3.1.0.json` to the `asyncapis/items/` request property `oneOf` list
- **2025-08-19** `077e00451e07` — 1 breaking
  - removed `#/components/schemas/3.1.0.json` from the `asyncapis/items/` request property `oneOf` list

[Change history](https://skmtc.dev/asyncapi/apis/asyncapi-server-api/changes/diff/post.md)

---

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