> [!WARNING]
>
> **Preview**
>
>
> This product or feature is
>
> subject to the "Pre-GA Offerings Terms" in the General Service Terms section
> of the [Service Specific
> Terms](https://docs.cloud.google.com/terms/service-terms#1).
>
> Pre-GA products and features are available "as is" and might have limited support.
>
> For more information, see the
> [launch stage descriptions](https://cloud.google.com/products/#product-launch-stages).

- [HTTP request](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.contexts.compatibility/checkCompatibility.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.contexts.compatibility/checkCompatibility.md.txt#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.contexts.compatibility/checkCompatibility.md.txt#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.contexts.compatibility/checkCompatibility.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.contexts.compatibility/checkCompatibility.md.txt#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.contexts.compatibility/checkCompatibility.md.txt#body.aspect)
- [Try it!](https://docs.cloud.google.com/managed-service-for-apache-kafka/docs/reference/rest/v1/projects.locations.schemaRegistries.contexts.compatibility/checkCompatibility.md.txt#try-it)

services.check compatibility of a schema with all versions or a specific version of a subject.

### HTTP request

`POST https://managedkafka.googleapis.com/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/compatibility/**}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the resource to check compatibility for. The format is either of following: \* projects/{project}/locations/{location}/schemaRegistries/{schemaRegistry}/compatibility/subjects/\*/versions: services.check compatibility with one or more versions of the specified subject. \* projects/{project}/locations/{location}/schemaRegistries/{schemaRegistry}/compatibility/subjects/{subject}/versions/{version}: services.check compatibility with a specific version of the subject. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "schema": string, "references": [ { object (`SchemaReference`) } ], "schemaType": enum (`SchemaType`), "verbose": boolean } ``` |

| Fields ||
|---|---|
| `schema` | `string` Required. The schema payload |
| `references[]` | ``object (`SchemaReference`)`` Optional. The schema references used by the schema. |
| `schemaType` | ``enum (`SchemaType`)`` Optional. The schema type of the schema. |
| `verbose` | `boolean` Optional. If true, the response will contain the compatibility check result with reasons for failed checks. The default is false. |

### Response body

If successful, the response body contains an instance of `CheckCompatibilityResponse`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication.md.txt#authorization-gcp).