> ## Documentation Index
> Fetch the complete documentation index at: https://developer.dittowords.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete variants

> Deletes variants from the workspace by their developer IDs. This can't be undone. A variant can't be deleted while any text item or library component still has text for it, and one such variant rejects the whole batch — remove that text first, then retry. Style guides scoped to a deleted variant survive but stop being variant-scoped.



## OpenAPI

````yaml openapi.json delete /variants
openapi: 3.0.0
info:
  version: 1.0.0
  title: Ditto API
  description: Programmatically read and write data in your Ditto workspace.
servers:
  - url: https://api.dittowords.com/v2
security: []
paths:
  /variants:
    delete:
      tags:
        - Variants
      summary: Delete variants
      description: >-
        Deletes variants from the workspace by their developer IDs. This can't
        be undone. A variant can't be deleted while any text item or library
        component still has text for it, and one such variant rejects the whole
        batch — remove that text first, then retry. Style guides scoped to a
        deleted variant survive but stop being variant-scoped.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                developerIds:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  description: >-
                    Developer IDs of the variants to delete. A variant can't be
                    deleted while any text item or library component still has
                    text for it, and one such variant rejects the whole batch.
              required:
                - developerIds
              example:
                developerIds:
                  - fr-ca
      responses:
        '200':
          description: Returns success status of the deletion operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates whether the deletion was successful
                required:
                  - success
                example:
                  success: true
        '400':
          description: >-
            Returned when a text item or library component still has text for a
            variant, or the variant is attached to a legacy project or component
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - message
              example:
                message: >-
                  Can't delete variants while text items or library components
                  still have text for them: fr-ca. Remove that text from every
                  text item and library component first, then retry.
        '404':
          description: >-
            Returned when a developer ID does not match any existing variant in
            the workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - message
              example:
                message: 'Variant not found: fr-ca'
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````