dotCMS Variants API

Endpoints for managing content variants

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /api/v1/variants Create a content variant · Creates a new content variant #
Ask an LLM
“How do I create a content variant for A/B testing?”
“Can I give a new variant a name and description?”
Tell an agent
Create a content variant named {name}.
Add variant {name} described as {description}.
PUT /api/v1/variants/{variantName}/_promote Promote a variant to default · Promotes a variant to become the default #
Ask an LLM
“How do I make a winning variant the live default content?”
“What happens to the default content when a variant is promoted?”
Tell an agent destructive · confirm first
Promote variant {variantName} to be the default.
Make variant {variantName} live for all users.
PUT /api/v1/versionables/{versionableInode}/_bringback Restore an older version · Bring back #
Ask an LLM
“How do I roll content back to a previous version?”
“Can I bring back an older version by its inode?”
Tell an agent
Bring back version {versionableInode}.
Restore the content to the version with inode {versionableInode}.
DELETE /api/v1/versionables/{versionableInode} Delete a specific version · Delete version #
Ask an LLM
“How do I delete one old version from an item's history?”
“Can I remove a version by its inode?”
Tell an agent destructive · confirm first
Delete version {versionableInode}.
Remove the historical version with inode {versionableInode}.
GET /api/v1/versionables/{versionableInodeOrIdentifier} Look up a version by inode or identifier · Find versionable #
Ask an LLM
“How do I look up a versioned item by inode or identifier?”
“What versions exist for a piece of content?”
Tell an agent
Find the versionable {versionableInodeOrIdentifier}.
Show version details for inode or identifier {versionableInodeOrIdentifier}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dotcms:dotcms-variants-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dotcms-variants-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: dotCMS REST Variants API
  version: '3'
  description: Endpoints for managing content variants
servers:
- url: /
  description: dotCMS Server
tags:
- name: Variants
  description: Endpoints for managing content variants
paths:
  /api/v1/variants:
    post:
      tags:
      - Variants
      summary: Creates a new content variant
      description: Creates a new content variant with the specified name and description. Variants allow for A/B testing and personalization of content.
      operationId: addVariant_1
      requestBody:
        description: Variant configuration including name and description
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VariantForm'
        required: true
      responses:
        '200':
          description: Variant created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseEntityVariantView'
        '400':
          description: Bad request - Invalid variant data or variant already exists
        '401':
          description: Unauthorized - User not authenticated
        '403':
          description: Forbidden - User lacks required permissions
        '500':
          description: Internal server error
  /api/v1/variants/{variantName}/_promote:
    put:
      tags:
      - Variants
      summary: Promotes a variant to become the default
      description: Promotes a content variant to replace the default content version. This action makes the variant content live for all users.
      operationId: promoteVariant_1
      parameters:
      - name: variantName
        in: path
        description: Name of the variant to promote
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Variant promoted successfully
        '400':
          description: Bad request - Invalid variant name
        '401':
          description: Unauthorized - User not authenticated
        '403':
          description: Forbidden - User lacks required permissions
        '404':
          description: Variant not found
        '500':
          description: Internal server error
  /api/v1/versionables/{versionableInode}/_bringback:
    put:
      tags:
      - Variants
      operationId: bringBack
      parameters:
      - name: versionableInode
        in: path
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            application/json: {}
            application/javascript: {}
      summary: Bring back
      x-summary-source: derived
  /api/v1/versionables/{versionableInode}:
    delete:
      tags:
      - Variants
      operationId: deleteVersion
      parameters:
      - name: versionableInode
        in: path
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            application/json: {}
            application/javascript: {}
      summary: Delete version
      x-summary-source: derived
  /api/v1/versionables/{versionableInodeOrIdentifier}:
    get:
      tags:
      - Variants
      operationId: findVersionable
      parameters:
      - name: versionableInodeOrIdentifier
        in: path
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            application/json: {}
            application/javascript: {}
      summary: Find versionable
      x-summary-source: derived
components:
  schemas:
    VariantForm:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
    MessageEntity:
      type: object
      properties:
        message:
          type: string
    ResponseEntityVariantView:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorEntity'
        entity:
          $ref: '#/components/schemas/Variant'
        messages:
          type: array
          items:
            $ref: '#/components/schemas/MessageEntity'
        i18nMessagesMap:
          type: object
          additionalProperties:
            type: string
        permissions:
          type: array
          items:
            type: string
        pagination:
          $ref: '#/components/schemas/Pagination'
    Pagination:
      type: object
      properties:
        currentPage:
          type: integer
          format: int32
        perPage:
          type: integer
          format: int32
        totalEntries:
          type: integer
          format: int64
    ErrorEntity:
      type: object
      properties:
        errorCode:
          type: string
        message:
          type: string
        fieldName:
          type: string
    Variant:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        archived:
          type: boolean