---
title: "POST /subjects/{subject}/versions"
method: POST
path: "/subjects/{subject}/versions"
tags: ["Subjects"]
---

# POST /subjects/{subject}/versions

`POST /subjects/{subject}/versions`

## Request

- The document declares no server URL.
- Auth: none declared

Register a new schema.

## Path parameters

- `subject` string, required

## Query parameters

- `normalize` boolean
- `format` string

## Headers

- `X-Registry-GroupId` string

## Request body

- RegisterSchemaRequest
  - `schema` string, required: The schema definition as a string.
  - `schemaType` string: The schema format (AVRO, PROTOBUF, JSON). Default is AVRO.
  - `references` SchemaReference[]: A list of referenced schemas.
    - `name` string, required
    - `subject` string, required
    - `version` integer, required
  - `metadata` object: Optional metadata associated with the schema.
  - `ruleSet` object: Optional ruleset configuration for the schema.

## Response `200`

Schema successfully registered (or already exists).

- SchemaId
  - `id` integer, required

## Other responses

- `409`: Error returned by the Schema Registry API
- `422`: Error returned by the Schema Registry API
- `500`: Error returned by the Schema Registry API

---

[API](https://skmtc.dev/apicurio/apis/apicurio-registry-confluent-compatibility-api.md) - [All operations](https://skmtc.dev/apicurio/apis/apicurio-registry-confluent-compatibility-api/llms.txt) - [OpenAPI document](https://skmtc.dev/apicurio/apis/apicurio-registry-confluent-compatibility-api/revisions/a2f9ca447c9b?raw)
