# Create a new version of a content type

Creates a copy of a content type with the same ID as the original, but the version number is updated (for example, from `1` to `2`). You can work on the versions independently. During this process you can also create associated content type values, even if you want to add more later.

Endpoint: POST /api/v2/cm/branches/{branchId}/content-types/{contentTypeId}
Version: v2.0
Security: OAuth2.0

## Security:

  - `OAuth2.0` (unknown)
    oauth2

## Path parameters:

  - `branchId` (string, required)
    The ID of the branch, for example `prod`.

  - `contentTypeId` (string, required)
    The ID of the content type, for example `color`.

## Request body:

  - `application/json-patch+json, application/json, text/json, application/*+json` (unknown)
    Parameter containing the content type request.

## Request fields (application/json-patch+json):

  - `name` (string)

  - `label` (string)

  - `description` (string)

  - `isDirectQuery` (boolean)

  - `isPrivate` (boolean)

  - `versionTags` (array)

  - `fields` (array)

  - `fields.id` (string)

  - `fields.name` (string)

  - `fields.label` (string)

  - `fields.type` (string)
    Enum: "Text", "RichText", "Number", "Boolean", "DateTime", "Reference", "Select", "Json"

  - `fields.required` (boolean)

  - `fields.helpText` (string)

  - `fields.priorityField` (boolean)

  - `fields.isPrivate` (boolean)

  - `fields.singleLineText` (boolean)

  - `fields.rules` (object)

  - `fields.rules.length` (object)

  - `fields.rules.length.min` (integer)

  - `fields.rules.length.max` (integer)

  - `fields.rules.regexp` (object)

  - `fields.rules.regexp.value` (string)

  - `fields.defaultValues` (object)

  - `fields.reference` (object)

  - `fields.reference.id` (string)

  - `fragments` (array)

  - `fragmentKey` (string)

## Response 201:

  - `201` (unknown)
    Successful creation

## Response 201 fields (application/json):

  - `id` (string, required)

  - `name` (string, required)

  - `label` (string)

  - `description` (string)

  - `version` (integer)

  - `isDirectQuery` (boolean)

  - `isPrivate` (boolean)

  - `isProtected` (boolean)

  - `fields` (array, required)

  - `fields.id` (string)

  - `fields.name` (string)

  - `fields.label` (string)

  - `fields.type` (string)
    Enum: "Text", "RichText", "Number", "Boolean", "DateTime", "Reference", "Select", "Json"

  - `fields.required` (boolean)

  - `fields.helpText` (string)

  - `fields.priorityField` (boolean)

  - `fields.isPrivate` (boolean)

  - `fields.singleLineText` (boolean)

  - `fields.rules` (object)

  - `fields.rules.length` (object)

  - `fields.rules.length.min` (integer)

  - `fields.rules.length.max` (integer)

  - `fields.rules.regexp` (object)

  - `fields.rules.regexp.value` (string)

  - `fields.defaultValues` (object)

  - `fields.reference` (object)

  - `fields.reference.id` (string)

  - `fragmentKey` (string)

  - `versionTags` (array)

  - `fragments` (array)

  - `system` (object, required)

  - `system.status` (string)
    Enum: "Draft", "Published", "Archived"

  - `system.availabilityDate` (string)

  - `system.unavailabilityDate` (string)

  - `system.publishedAt` (string)

  - `system.publishedBy` (string)

  - `system.archivedDate` (string)

  - `system.archivedBy` (string)

  - `system.environment` (string, required)

  - `system.type` (string, required)

  - `system.hash` (string, required)

  - `system.createdAt` (string, required)

  - `system.createdBy` (string, required)

  - `system.updatedAt` (string)

  - `system.updatedBy` (string)

## Response 400:

  - `400` (unknown)
    Request not valid or error during operation

## Response 400 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized request or invalid access token

## Response 403:

  - `403` (unknown)
    Request does not contain required scopes

## Response 409:

  - `409` (unknown)
    Conflict

## Response 500:

  - `500` (unknown)
    Server-side exception during request execution

## Response 500 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

