# Remove Split Test Variant

Removes an email newsletter split-test variant and deletes its email and content permanently. Returns the remaining variants with evenly redistributed shares. The last variant cannot be removed; a started test refuses the change. Sends nothing.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "campaignId": {
      "type": "integer",
      "description": "ID of the split test campaign the variant belongs to",
      "minimum": 1
    },
    "emailId": {
      "type": "integer",
      "description": "Email ID of the variant to remove, as get-newsletter returns it in splitTestVariants",
      "minimum": 1
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "campaignId",
    "emailId"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "newsletterId",
    "variants",
    "variantCount",
    "needsMoreVariants",
    "sharePerVariantPercent",
    "testSizePercent",
    "testDurationHours",
    "winnerBy",
    "hasStarted"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "newsletterId": {
      "type": "integer"
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "emailId",
          "label",
          "name",
          "subject",
          "editorUrl",
          "contentRevision"
        ],
        "properties": {
          "emailId": {
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "editorUrl": {
            "type": "string"
          },
          "contentRevision": {
            "type": "string"
          }
        }
      }
    },
    "variantCount": {
      "type": "integer"
    },
    "needsMoreVariants": {
      "type": "boolean"
    },
    "sharePerVariantPercent": {
      "type": "integer"
    },
    "testSizePercent": {
      "type": "integer"
    },
    "testDurationHours": {
      "type": "integer"
    },
    "winnerBy": {
      "type": [
        "string",
        "null"
      ]
    },
    "hasStarted": {
      "type": "boolean"
    }
  }
}
```

