---
title: "POST /v1/{+parent}/versions"
method: POST
path: "/v1/{+parent}/versions"
tags: ["projects"]
---

# POST /v1/{+parent}/versions

`POST /v1/{+parent}/versions`

Register a new version under a given subject with the given schema.

## Path parameters

- `parent` string, required

## Request body

- CreateVersionRequest — Request for CreateVersion.
  - `schema` string — Required. The schema payload
  - `normalize` boolean — Optional. If true, the schema will be normalized before being stored. The default is false.
  - `references` SchemaReference[] — Optional. The schema references used by the schema.
    - `version` integer — Required. The version of the reference.
    - `name` string — Required. The name of the reference.
    - `subject` string — Required. The subject of the reference.
  - `schemaType` 'SCHEMA_TYPE_UNSPECIFIED' | 'AVRO' | 'JSON' | 'PROTOBUF' — Optional. The type of the schema. It is optional. If not specified, the schema type will be AVRO.
  - `id` integer — Optional. The schema ID of the schema. If not specified, the schema ID will be generated by the server. If the schema ID is specified, it must not be used by an existing schema that is different from the schema to be created.
  - `version` integer — Optional. The version to create. It is optional. If not specified, the version will be created with the max version ID of the subject increased by 1. If the version ID is specified, it will be used as the new version ID and must not be used by an existing version of the subject.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/managedkafka.md) · [All operations](https://skmtc.net/google/apis/managedkafka/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/managedkafka/revisions/ebfb70483869/schema)
