CreateSplitTestCampaign (beta)

Creates a split test campaign

This method creates a split test campaign.

SOAP action: [http://apiconnector.com/v2/ApiService/CreateSplitTestCampaign]

❗️

API call in beta

Please note that this API call is in beta and is subject to change.

Example

using (var client = new ApiServiceClient())
{
    client.ClientCredentials.UserName.UserName = "username";
    client.ClientCredentials.UserName.Password = "password";

    var splitTestCampaign = new ApiSplitTestCampaign
    {
        Name = "Split Test Campaign",
        Subjects = new string[]
        {
            "My subject variation A",
            "My subject variation B",
            "My subject variation C"
        },
        FromNames = new string[]
        {
            "My name variation A",
            "My name variation B",
            "My name variation C"
        },
        FromAddresses = new ApiCampaignFromAddress[]
        {
            new ApiCampaignFromAddress { Email = "[email protected]" },
            new ApiCampaignFromAddress { Email = "[email protected]" },
            new ApiCampaignFromAddress { Email = "[email protected]" }
        },
        HtmlContents = new string[]
        {
            "\r\n<!-- Easy Editor -->\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"ee_resizable ee_mobiletemplate\" data-dmtmp=\"true\">\r\n  <tbody>\r\n    <tr>\r\n      <td align=\"center\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">\r\n        <table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"eem_mainouterzone\">\r\n          <tbody>\r\n            <tr>\r\n              <td bgcolor=\"#ffffff\" class=\"ee_dropzone\" style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;\" align=\"left\">\r\n                <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px; background-color: rgb(255, 255, 255); table-layout: auto;\" class=\"ee_element\" bgcolor=\"#ffffff\">\r\n                  <tbody>\r\n                    <tr>\r\n                      <td align=\"left\" style=\"padding: 0px; width: 600px;\" class=\"\"><div class=\"ee_editable\"><font style=\"font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px;\"><a href=\"http://$UNSUB$\" style=\"color: black;\"> Unsubscribe from this newsletter</a></font> </div></td>\r\n                    </tr>\r\n                  </tbody>\r\n                </table>\r\n              </td>\r\n            </tr>\r\n          </tbody>\r\n        </table>\r\n      </td>\r\n    </tr>\r\n  </tbody>\r\n</table>",
            "\r\n<!-- Easy Editor -->\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"ee_resizable ee_mobiletemplate\" data-dmtmp=\"true\">\r\n  <tbody>\r\n    <tr>\r\n      <td align=\"center\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">\r\n        <table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"eem_mainouterzone\">\r\n          <tbody>\r\n            <tr>\r\n              <td bgcolor=\"#ffffff\" class=\"ee_dropzone\" style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;\" align=\"left\">\r\n                <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px; background-color: rgb(255, 255, 255); table-layout: auto;\" class=\"ee_element\" bgcolor=\"#ffffff\">\r\n                  <tbody>\r\n                    <tr>\r\n                      <td align=\"left\" style=\"padding: 0px; width: 600px;\" class=\"\"><div class=\"ee_editable\"><font style=\"font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px;\"><a href=\"http://$UNSUB$\" style=\"color: black;\"> Don't want to hear from us?</a></font> </div></td>\r\n                    </tr>\r\n                  </tbody>\r\n                </table>\r\n              </td>\r\n            </tr>\r\n          </tbody>\r\n        </table>\r\n      </td>\r\n    </tr>\r\n  </tbody>\r\n</table>",
            "\r\n<!-- Easy Editor -->\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"ee_resizable ee_mobiletemplate\" data-dmtmp=\"true\">\r\n  <tbody>\r\n    <tr>\r\n      <td align=\"center\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">\r\n        <table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout: auto;\" class=\"eem_mainouterzone\">\r\n          <tbody>\r\n            <tr>\r\n              <td bgcolor=\"#ffffff\" class=\"ee_dropzone\" style=\"padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;\" align=\"left\">\r\n                <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px; background-color: rgb(255, 255, 255); table-layout: auto;\" class=\"ee_element\" bgcolor=\"#ffffff\">\r\n                  <tbody>\r\n                    <tr>\r\n                      <td align=\"left\" style=\"padding: 0px; width: 600px;\" class=\"\"><div class=\"ee_editable\"><font style=\"font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px;\"><a href=\"http://$UNSUB$\" style=\"color: black;\"> Remove me from this list</a></font> </div></td>\r\n                    </tr>\r\n                  </tbody>\r\n                </table>\r\n              </td>\r\n            </tr>\r\n          </tbody>\r\n        </table>\r\n      </td>\r\n    </tr>\r\n  </tbody>\r\n</table>"

        },
        PlainTextContents = new string[]
        {
            "\r\n\r\n---\r\nWant to unsubscribe? $UNSUB$",
            "\r\n\r\n---\r\nDon't want to hear from us? $UNSUB$",
            "\r\n\r\n---\r\nRemove me from this list $UNSUB$"
        }
    };

    var result = client.CreateSplitTestCampaignAsync(splitTestCampaign).Result;
}