# Update Website Split Test

Updates a website split test; omitted settings stay, variant and target lists replace the current ones, the kind cannot change. Refused once the test has visitors or conversions or is terminated: delete-website-split-test-statistics unlocks a running test, copy-website-split-test starts a new one. Embedding websites show changed variants to their next visitors.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "ID of the split test, from search-website-split-tests or create-website-split-test",
      "minimum": 1
    },
    "name": {
      "type": [
        "null",
        "string"
      ],
      "description": "New name of the split test",
      "default": null,
      "minLength": 1,
      "maxLength": 250
    },
    "selection": {
      "type": [
        "string",
        "null"
      ],
      "description": "round-robin or random",
      "default": null,
      "enum": [
        "round-robin",
        "random",
        null
      ]
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 250
          },
          "spUrl": {
            "type": "string",
            "maxLength": 2000
          },
          "weight": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "price": {
            "type": "integer",
            "minimum": 0
          },
          "content": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "default": null
    },
    "targets": {
      "type": "array",
      "description": "Names of up to five conversion goals the conversion snippet reports; replaces the current ones",
      "default": null,
      "items": {
        "type": "string",
        "maxLength": 250
      },
      "maxItems": 5
    },
    "metaLabels": {
      "type": "array",
      "description": "Labels of the split test; replaces the current ones",
      "default": null,
      "items": {
        "type": "string",
        "maxLength": 250
      }
    },
    "notes": {
      "type": [
        "null",
        "string"
      ],
      "description": "Internal note",
      "default": null,
      "maxLength": 1000
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account of the access token",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "type",
    "id",
    "settings",
    "ui"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "type": {
      "type": "string"
    },
    "id": {
      "type": "integer"
    },
    "settings": {
      "type": "object"
    },
    "ui": {
      "type": "object"
    }
  },
  "additionalProperties": false
}
```

