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

# Delete an A/B variant

> Removes a paused variant. A variant still receiving traffic is refused with 409: set it to 0 with setAbTraffic first. A paused variant that still holds open conversations is refused with 409 too, since those conversations would fall back to the base configuration while still counted as the variant: retry once they have closed.



## OpenAPI

````yaml /api-reference/specs/claudia/v1.json delete /v1/projects/{project}/ab-test/variants/{key}
openapi: 3.0.1
info:
  title: Claudia API
  version: 1.0.0
servers:
  - url: https://api.cloudhumans.com/claudia
    description: Production
  - url: https://api.cloudhumans.com/claudia/staging
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: MCP Servers
    description: >-
      The MCP servers your agents can call tools on. Registering one here is
      what makes its tools selectable in an agent; the credentials it needs are
      stored encrypted and never read back.
  - name: Knowledge Base Content
    description: Read, search and edit the content that answers your customers.
  - name: Content Quality
    description: Rewrites proposed for content that is answering your customers badly.
  - name: Playground
    description: >-
      Talk to one of your agents as if you were a customer, without touching a
      real conversation.
  - name: Project Settings
    description: >-
      Read and change how a ClaudIA project behaves — the settings screens of
      the ClaudIA app, as an API.
  - name: Content Improvements
    description: Answers Claudia proposes for questions your content does not cover yet.
  - name: Knowledge Bases
    description: The knowledge bases your account can manage.
  - name: Content Sources
    description: The sites Claudia crawls to keep a knowledge base in sync.
  - name: Agents
    description: >-
      The AI agents (assistants) configured for your tenant: the orchestrator
      (supervisor) and its specialists (react). Reads answer the same
      passthrough shape the platform stores; creates land as DRAFTS a human
      reviews and publishes in the app.
  - name: Agent Tools
    description: >-
      The tool catalog your agents can be given, aggregated across every MCP
      server registered for the tenant. This is the same catalog an assistant's
      mcp_servers[].tools whitelist is validated against.
  - name: Conversations
    description: >-
      Read access to a conversation's lean investigation summary — messages,
      status and resolution — and the execution trace behind one of its
      processed messages, without the internal processing state the hub UI's
      full read carries.
paths:
  /v1/projects/{project}/ab-test/variants/{key}:
    delete:
      tags:
        - A/B Tests
      summary: Delete an A/B variant
      description: >-
        Removes a paused variant. A variant still receiving traffic is refused
        with 409: set it to 0 with setAbTraffic first. A paused variant that
        still holds open conversations is refused with 409 too, since those
        conversations would fall back to the base configuration while still
        counted as the variant: retry once they have closed.
      operationId: deleteAbVariant
      parameters:
        - name: project
          in: path
          description: >-
            The ClaudIA project to act on, by name. Get the names from
            listMyClaudiaProjects — a project these credentials do not cover
            answers 404, indistinguishable from one that does not exist.
          required: true
          schema:
            type: string
        - name: key
          in: path
          description: >-
            The variant to act on, 1 to 64 letters, digits, `_` or `-`.
            getProjectAbTest lists the existing ones.
          required: true
          schema:
            type: string
          example: short_summary
        - name: accountId
          in: query
          description: >-
            The CloudChat account whose permissions decide what you may read and
            write here, e.g. `7`. It is permission context, not the resource:
            the project is named in the path. Only unique within an instance, so
            it is always read together with the `cloudchat-instance` header —
            get the pair from listMyCloudChatAccounts. An account your
            credentials hold no editing claim for answers 403.
          required: true
          schema:
            type: string
        - name: cloudchat-instance
          in: header
          description: >-
            The CloudChat instance the account lives in, e.g. `4`. Sent as a
            header, and required: with `accountId` it forms the pair that names
            exactly one account, which `accountId` alone does not.
            listMyCloudChatAccounts returns the value to send here alongside
            each accountId.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Deleted. The whole A/B test is returned as it now stands.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectAbTest'
        '400':
          description: The request could not be answered as written.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, expired or invalid credentials.
        '403':
          description: >-
            The variant overrides settings these credentials cannot write.
            Nothing was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectAbTestRefused'
        '404':
          description: >-
            No such resource, or none these credentials can reach — the two are
            deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The variant still receives traffic, still holds open conversations,
            or (`concurrent_change`: someone else changed the A/B test since it
            was read. Nothing was saved; read it again with getProjectAbTest and
            redo the change on top of what is there now.)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectAbTestRefused'
        '429':
          description: Rate limit applied by the API gateway. Back off and retry.
        '503':
          description: >-
            The variant's open conversations could not be checked, so nothing
            was deleted. Retrying is reasonable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ProjectAbTest:
      required:
        - baselinePercentage
        - variants
      type: object
      properties:
        baselinePercentage:
          type: integer
          description: >-
            Share of new conversations that run the base configuration, in
            percent.
          format: int32
          example: 80
        variants:
          type: array
          description: >-
            Every variant this project declares, including the ones receiving no
            traffic.
          items:
            $ref: '#/components/schemas/ProjectAbVariant'
      description: >-
        How this project's conversations are split between its base
        configuration and each A/B variant. Every new conversation draws once
        and keeps the variant it drew until it ends, always running that
        variant's current settings.
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
          description: What went wrong.
          example: 'Forbidden: token holds no claim for the requested account'
      description: Something the caller needs to fix.
    ProjectAbTestRefused:
      required:
        - error
        - reason
      type: object
      properties:
        error:
          type: string
          description: What went wrong.
          example: The base share does not match the variants' traffic
        reason:
          type: string
          description: >-
            Machine-readable cause: `invalid_key`, `unknown_variant`,
            `locked_variant`, `not_overridable`, `forbidden_fields`,
            `not_applicable`, `invalid_settings`, `percentage_out_of_range`,
            `traffic_over_100`, `baseline_mismatch`, `variant_live` or
            `concurrent_change`.
          example: baseline_mismatch
        keys:
          type: array
          description: >-
            The variant keys or dotted setting paths the refusal is about, when
            it names any.
          items:
            type: string
            description: >-
              The variant keys or dotted setting paths the refusal is about,
              when it names any.
        expectedBaselinePercentage:
          type: integer
          description: >-
            On `baseline_mismatch`: the base share these percentages actually
            leave.
          format: int32
          example: 80
        violations:
          type: array
          description: 'On `invalid_settings`: every rule the overrides broke.'
          items:
            $ref: '#/components/schemas/ProjectSettingsViolation'
      description: The change was refused and nothing was saved.
    ProjectAbVariant:
      required:
        - editable
        - hiddenOverrideCount
        - key
        - overrides
        - percentage
      type: object
      properties:
        key:
          type: string
          description: Identifies the variant. Also what runPlayground takes as `abKey`.
          example: short_summary
        percentage:
          type: integer
          description: >-
            Share of new conversations that run this variant, in percent. 0
            means paused.
          format: int32
          example: 20
        editable:
          type: boolean
          description: >-
            Whether these credentials may change this variant: edit it, change
            its traffic or delete it. A variant is editable only by someone who
            may write every setting it overrides.
        overrides:
          type: object
          additionalProperties: true
          description: >-
            The settings this variant replaces, nested as in getProjectSettings,
            limited to the ones these credentials may read.
          example:
            summaryPrompt: Resuma em uma frase.
        hiddenOverrideCount:
          type: integer
          description: >-
            How many overridden settings were left out of `overrides` because
            these credentials cannot read them. Above 0 means the variant
            changes more than what is shown.
          format: int32
          example: 0
      description: 'One A/B variant: the settings it replaces and the traffic it receives.'
    ProjectSettingsViolation:
      required:
        - params
        - path
        - ruleId
      type: object
      properties:
        path:
          type: string
          description: The dotted path the rule applies to.
          example: splitLargeMessages.chunkSize
        ruleId:
          type: string
          description: Which rule was broken.
          example: value_out_of_range
        params:
          type: object
          additionalProperties:
            type: object
            description: The rule's bounds or expected values, when it has any.
            example:
              min: 1
              max: 4096
          description: The rule's bounds or expected values, when it has any.
          example:
            min: 1
            max: 4096
      description: One rule the patch broke.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.