---
title: "Diff two OpenAPI specs and classify every change"
method: POST
path: "/api/v1/tools/openapi-diff"
tags: ["tools"]
---

# Diff two OpenAPI specs and classify every change

`POST /api/v1/tools/openapi-diff`

## Request

- Base URL: `https://monit.rs`
- URL: `https://monit.rs/api/v1/tools/openapi-diff`
- Auth: none declared

Supply each side as inline text (`old_spec`/`new_spec`, JSON or YAML) or as an HTTPS URL (`old_url`/`new_url`). Inline wins if both are given. No account required.

## Request body

- OpenAPIDiffRequest
  - `old_spec` string, nullable: Inline OpenAPI spec (JSON or YAML).
  - `new_spec` string, nullable: Inline OpenAPI spec (JSON or YAML).
  - `old_url` string, nullable: HTTPS URL to fetch the old spec from.
  - `new_url` string, nullable: HTTPS URL to fetch the new spec from.

## Response `200`

Successful Response

- object

## Other responses

- `400`: Neither inline spec nor URL supplied for a side, or a fetched spec was unusable.
- `422`: Validation Error
- `502`: A spec URL could not be fetched.

---

[API](https://skmtc.dev/monit/apis/monit-rs-public-api.md) · [All operations](https://skmtc.dev/monit/apis/monit-rs-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/monit/apis/monit-rs-public-api/revisions/7e1923981112?raw)
