# Remove SMS Newsletter Split Test Variant

Removes an SMS newsletter split-test variant and permanently deletes its SMS. The last variant cannot be removed; shares are redistributed evenly. Refused after the test starts; sends nothing.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "newsletterId": {
      "type": "integer",
      "description": "ID of an SMS newsletter created as a split test",
      "minimum": 1
    },
    "messageId": {
      "type": "integer",
      "description": "messageId of the variant to remove",
      "minimum": 1
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account of the access token",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "newsletterId",
    "messageId"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "campaignId",
    "channel",
    "testSizePercent",
    "testDurationHours",
    "winnerBy",
    "hasStarted",
    "needsMoreVariants",
    "variants"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "campaignId": {
      "type": "integer"
    },
    "channel": {
      "type": "string",
      "enum": [
        "email",
        "sms"
      ]
    },
    "testSizePercent": {
      "type": "integer"
    },
    "testDurationHours": {
      "type": "integer"
    },
    "winnerBy": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "opens",
        "clicks",
        "conversions",
        "revenue",
        null
      ]
    },
    "hasStarted": {
      "type": "boolean"
    },
    "needsMoreVariants": {
      "type": "boolean"
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "messageId",
          "label",
          "name",
          "email",
          "sms"
        ],
        "properties": {
          "messageId": {
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "emailId",
              "subject",
              "preheader",
              "reportSpamHeader",
              "editorUrl",
              "contentUrl"
            ],
            "properties": {
              "emailId": {
                "type": "integer"
              },
              "subject": {
                "type": "string"
              },
              "preheader": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reportSpamHeader": {
                "type": "boolean"
              },
              "editorUrl": {
                "type": "string"
              },
              "contentUrl": {
                "type": "string"
              }
            }
          },
          "sms": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "smsId",
              "text",
              "senderName",
              "provider",
              "linkTracking",
              "contentUrl"
            ],
            "properties": {
              "smsId": {
                "type": "integer"
              },
              "text": {
                "type": "string"
              },
              "senderName": {
                "type": "string"
              },
              "provider": {
                "type": "string"
              },
              "linkTracking": {
                "type": "boolean"
              },
              "contentUrl": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

