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

# Creates a new content variant

`POST /api/v1/variants`

## Request

- Base URL: `https://docs.anzworldline-solutions.com.au`
- URL: `https://docs.anzworldline-solutions.com.au/api/v1/variants`
- Auth: none declared
- TypeScript: <https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/docs/api/v1/variants/post.ts> (a function with typed inputs; its response is checked against the schema)

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

## Changes

- **2026-10-30** `4fd8e917d458`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/changes/api/v1/variants/post.md)

---

[API](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api.md) - [All operations](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/revisions/4fd8e917d458?raw)
