{"id":17094,"date":"2026-05-11T11:31:23","date_gmt":"2026-05-11T10:31:23","guid":{"rendered":"https:\/\/help.expertsender.com\/?post_type=es&#038;p=17094"},"modified":"2026-05-11T11:32:55","modified_gmt":"2026-05-11T10:32:55","slug":"set-a-b-test-winner","status":"publish","type":"es","link":"https:\/\/help.expertsender.com\/pl\/emp\/set-a-b-test-winner\/","title":{"rendered":"Set A\/B test winner"},"content":{"rendered":"\n<p>Selects the winning content version for an A\/B test newsletter.<\/p>\n\n\n\n<p>This method can be used only for A\/B test newsletters created with manual winner selection.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"request\">Request<a href=\"#request\" class=\"not-prose content-heading-link\">#<\/a><\/h2>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#babed8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"POST https:\/\/api.esv2.com\/v2\/Api\/SetAbTestWinner\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-palenight\" style=\"background-color: #292D3E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">POST https:\/\/api.esv2.com\/v2\/Api\/SetAbTestWinner<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"request-data-format\">Request data format<a href=\"#request-data-format\" class=\"not-prose content-heading-link\">#<\/a><\/h2>\n\n\n\n<p>Data element children:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Element\/attribute<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>NewsletterId<\/td><td>integer<\/td><td>ID of the A\/B test newsletter. Required.<\/td><\/tr><tr><td>WinnerContentVersionId<\/td><td>integer<\/td><td>ID of the winning content version. Required.<\/td><\/tr><tr><td>SendDate<\/td><td>datetime<\/td><td>Date and time when the winning version should be sent. Optional. If not specified, the winner is sent immediately.<\/td><\/tr><tr><td>TimeZone<\/td><td>string<\/td><td>Time zone for\u00a0SendDate. Optional. If not specified, the business unit time zone is used. See the list of supported time zones in the newsletter documentation.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"response\">Response<a href=\"#response\" class=\"not-prose content-heading-link\">#<\/a><\/h2>\n\n\n\n<p>If the request is valid, the method returns HTTP status\u00a0<strong>201 Created<\/strong>.<\/p>\n\n\n\n<p>This method does not return any response body.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"additional-notes\">Additional notes&nbsp;<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This method can be used only for newsletters created with\u00a0WinnerPickMethod\u00a0set to\u00a0Manual.<\/li>\n\n\n\n<li>WinnerContentVersionId must point to one of the content versions created for the specified A\/B test.<\/li>\n\n\n\n<li>If SendDate is earlier than the current date and time, the winner is sent immediately.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"examples\">Examples<a href=\"#examples\" class=\"not-prose content-heading-link\">#<\/a><\/h2>\n\n\n\n<p><strong>Send the winner immediately<\/strong><\/p>\n\n\n\n<p>Request:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#babed8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"&lt;ApiRequest&gt;\n  &lt;ApiKey&gt;test_api_key&lt;\/ApiKey&gt;\n  &lt;Data&gt;\n    &lt;NewsletterId&gt;125269&lt;\/NewsletterId&gt;\n    &lt;WinnerContentVersionId&gt;206286&lt;\/WinnerContentVersionId&gt;\n  &lt;\/Data&gt;\n&lt;\/ApiRequest&gt;\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-palenight\" style=\"background-color: #292D3E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">ApiRequest<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">  <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">ApiKey<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #BABED8\">test_api_key<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">ApiKey<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">  <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">Data<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">NewsletterId<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #BABED8\">125269<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">NewsletterId<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">WinnerContentVersionId<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #BABED8\">206286<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">WinnerContentVersionId<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">  <\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">Data<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">ApiRequest<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><strong>Schedule sending the winner for a specific date.<\/strong><\/p>\n\n\n\n<p>Request:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#babed8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"&lt;ApiRequest&gt;\n  &lt;ApiKey&gt;test_api_key&lt;\/ApiKey&gt;\n  &lt;Data&gt;\n    &lt;NewsletterId&gt;125269&lt;\/NewsletterId&gt;\n    &lt;WinnerContentVersionId&gt;206286&lt;\/WinnerContentVersionId&gt;\n    &lt;SendDate&gt;2026-04-24T22:00:00Z&lt;\/SendDate&gt;\n    &lt;TimeZone&gt;Central European Standard Time&lt;\/TimeZone&gt;\n  &lt;\/Data&gt;\n&lt;\/ApiRequest&gt;\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-palenight\" style=\"background-color: #292D3E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">ApiRequest<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">  <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">ApiKey<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #BABED8\">test_api_key<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">ApiKey<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">  <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">Data<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">NewsletterId<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #BABED8\">125269<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">NewsletterId<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">WinnerContentVersionId<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #BABED8\">206286<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">WinnerContentVersionId<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">SendDate<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #BABED8\">2026-04-24T22:00:00Z<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">SendDate<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">    <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">TimeZone<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #BABED8\">Central European Standard Time<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">TimeZone<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">  <\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">Data<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">ApiRequest<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"author":13,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","emp-category":[208],"class_list":["post-17094","es","type-es","status-publish","format-standard","hentry","emp-category-api-2"],"acf":[],"_links":{"self":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/17094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es"}],"about":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/types\/es"}],"author":[{"embeddable":true,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/users\/13"}],"version-history":[{"count":1,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/17094\/revisions"}],"predecessor-version":[{"id":17100,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/17094\/revisions\/17100"}],"wp:attachment":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/media?parent=17094"}],"wp:term":[{"taxonomy":"emp-category","embeddable":true,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/emp-category?post=17094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}