# Copy a version

Copies an existing version into a new version with the provided name.

Endpoint: PUT /v3/{domain_name}/templates/{template_name}/versions/{version_name}/copy/{new_version_name}
Version: 3.0.0
Security: basicAuth

## Security:

  - `basicAuth` (unknown)
    http basic

## Path parameters:

  - `domain_name` (string, required)
    Domain name the template is associated with.

  - `template_name` (string, required)
    Template name the version is stored under.

  - `version_name` (string, required)
    Tag of the version to copy.

  - `new_version_name` (string, required)
    The name for the new version. If the version name already exists, the copy will fail.

## Query parameters:

  - `comment` (string)
    Comment to be used for the new version.

## Response 200:

  - `200` (unknown)
    A 200 response

## Response 200 fields (application/json):

  - `message` (string, required)
    Response message

  - `version` (any, required)
    Created version details

  - `version.tag` (string, required)
    Tag of the version. Must be unique to the template

  - `version.template` (string)
    Template content

  - `version.engine` (string, required)
    Rendering engine

  - `version.mjml` (string, required)
    Template source

  - `version.createdAt` (string, required)
    Creation date in RFC822 format

  - `version.comment` (string, required)
    Comment related to the version

  - `version.active` (boolean, required)
    If this flag is true

  - `version.id` (string, required)
    Template ID

  - `version.headers` (object)
    Key value JSON object of headers to be stored with the template. Where key is the header name and value is the header value. The header names `From`

  - `template` (any, required)
    Deprecated: Use 'version' field

## Response 400:

  - `400` (unknown)
    A 400 response

## Response 400 fields (application/json):

  - `message` (string, required)
    Response message

## Response 401:

  - `401` (unknown)
    A 401 response

## Response 401 fields (application/json):

  - `message` (string, required)
    Response message

## Response 404:

  - `404` (unknown)
    A 404 response

## Response 404 fields (application/json):

  - `message` (string, required)
    Response message

## Response 500:

  - `500` (unknown)
    A 500 response

## Response 500 fields (application/json):

  - `message` (string, required)
    Response message

## Response 200 examples:

  - `Example` (unknown)

