---
title: "Creates a new content variant"
method: POST
path: "/api/v1/variants"
tags: ["Variants"]
---

# Creates a new content variant

`POST /api/v1/variants`

Creates a new content variant with the specified name and description. Variants allow for A/B testing and personalization of content.

## Request body

- VariantForm
  - `name` string
  - `description` string

## Response `200`

Variant created successfully

- ResponseEntityVariantView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` Variant
    - `name` string
    - `description` string
    - `archived` boolean
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400` — Bad request - Invalid variant data or variant already exists
- `401` — Unauthorized - User not authenticated
- `403` — Forbidden - User lacks required permissions
- `500` — Internal server error

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jostens/dotcms-rest-api/revisions/a088fe9f515c/schema)
