# Update SMS Newsletter Split Test Variant

Updates one SMS newsletter split-test variant's name, text, provider, sender or link tracking. Omitted values stay unchanged. 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, from get-sms-newsletter-split-test",
      "minimum": 1
    },
    "name": {
      "type": [
        "null",
        "string"
      ],
      "description": "Internal name of the variant; omit to keep",
      "default": null,
      "maxLength": 250
    },
    "text": {
      "type": [
        "null",
        "string"
      ],
      "description": "The complete new text, plain text without HTML, at most 5000 characters; omit to keep",
      "default": null,
      "maxLength": 5000
    },
    "provider": {
      "type": [
        "null",
        "string"
      ],
      "description": "\"nexmo\" or \"twilio\"; omit to keep",
      "default": null,
      "enum": [
        "nexmo",
        "twilio"
      ]
    },
    "sender": {
      "type": [
        "null",
        "string"
      ],
      "description": "A sender number of the account for that provider, or a free sender name; omit to keep",
      "default": null,
      "minLength": 1,
      "maxLength": 32
    },
    "linkTracking": {
      "type": [
        "null",
        "boolean"
      ],
      "description": "Whether links are rewritten so clicks are counted; omit to keep",
      "default": null
    },
    "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"
              }
            }
          }
        }
      }
    }
  }
}
```

