---
title: "Test schema compatibility against a particular schema subject-version"
method: POST
path: "/compatibility/subjects/{subject}/versions/{version}"
tags: ["Compatibility (v1)"]
---

# Test schema compatibility against a particular schema subject-version

`POST /compatibility/subjects/{subject}/versions/{version}`

Test input schema against a particular version of a subject's schema for compatibility. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject's compatibility level was never changed, then the global compatibility level applies (http:get:: /config).

## Path parameters

- `subject` string, required
- `version` string, required

## Query parameters

- `normalize` boolean
- `verbose` boolean

## Request body

- RegisterSchemaRequest — Schema register request
  - `version` integer — Version number
  - `id` integer — Globally unique identifier of the schema
  - `schemaType` string — Schema type
  - `references` SchemaReference[] — References to other schemas
    - `name` string — Reference name
    - `subject` string — Name of the referenced subject
    - `version` integer — Version number of the referenced subject
  - `schema` string — Schema definition string
  - `metadata` Metadata, nullable — User-defined metadata
    - `tags` object
    - `properties` object
    - `sensitive` string[]
  - `ruleSet` RuleSet, nullable — Schema rule set
    - `migrationRules` Rule[]
      - `name` string — Rule name
      - `doc` string — Rule doc
      - `kind` 'TRANSFORM' | 'CONDITION' — Rule kind
      - `mode` 'UPGRADE' | 'DOWNGRADE' | 'UPDOWN' | 'WRITE' | 'READ' | 'WRITEREAD' — Rule mode
      - `type` string — Rule type
      - `tags` string[] — The tags to which this rule applies
      - `params` object — Optional params for the rule
      - `expr` string — Rule expression
      - `onSuccess` string — Rule action on success
      - `onFailure` string — Rule action on failure
      - `disabled` boolean — Whether the rule is disabled
    - `domainRules` Rule[]
      - `name` string — Rule name
      - `doc` string — Rule doc
      - `kind` 'TRANSFORM' | 'CONDITION' — Rule kind
      - `mode` 'UPGRADE' | 'DOWNGRADE' | 'UPDOWN' | 'WRITE' | 'READ' | 'WRITEREAD' — Rule mode
      - `type` string — Rule type
      - `tags` string[] — The tags to which this rule applies
      - `params` object — Optional params for the rule
      - `expr` string — Rule expression
      - `onSuccess` string — Rule action on success
      - `onFailure` string — Rule action on failure
      - `disabled` boolean — Whether the rule is disabled
  - `schemaTagsToAdd` SchemaTags[]
    - `schemaEntity` SchemaEntity
      - `entityPath` string
      - `entityType` 'sr_record' | 'sr_field'
    - `tags` string[]
  - `schemaTagsToRemove` SchemaTags[]
    - `schemaEntity` SchemaEntity
      - `entityPath` string
      - `entityType` 'sr_record' | 'sr_field'
    - `tags` string[]
  - `propagateSchemaTags` boolean

## Response `200`

Compatibility check result.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found. Error code 40401 indicates subject not found. Error code 40402 indicates version not found.
- `422` — Unprocessable entity. Error code 42201 indicates an invalid schema or schema type. Error code 42202 indicates an invalid version.
- `429` — Rate Limit Exceeded
- `500` — Internal Server Error. Error code 50001 indicates a failure in the backend data store.

---

[API](https://skmtc.dev/confluent/apis/confluent-cloud-apis.md) · [All operations](https://skmtc.dev/confluent/apis/confluent-cloud-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/confluent/confluent-cloud-apis/revisions/a6a73f98a698/schema)
