A/B Tests

Select A/B test winner

Changed on

Selects a winner for a campaign A/B test in the testing phase and queues the winning variant for the remaining audience. For a sequence A/B test, selects or changes the winner that future contacts reaching the step receive, including a winner picked automatically; contacts who already got a variant keep it. Campaign tests require the campaigns:send scope; sequence tests require sequences:write and, while the sequence is active, confirmLiveChange.

post/ab-tests/{abTestId}/select-winner

Request

  • Base URL
    https://api.sequenzy.com/api/v1
  • URL
    https://api.sequenzy.com/api/v1/ab-tests/{abTestId}/select-winner
  • Auth
    HTTP bearer

Path parameters

abTestIdstring required

Request body

variantIdstring required

Variant to select as the winner.

confirmLiveChangeboolean

Sequence tests only. Required as true when the sequence is active. Campaign tests ignore it.

Response

Winner selected. Campaign winner delivery is queued.

successboolean

Example response

{
  "abTest": {
    "id": "ab_abc123",
    "companyId": "company_abc123",
    "campaignId": "camp_abc123",
    "automationNodeId": "node_abc123",
    "name": "Subject test",
    "status": "draft",
    "winnerCriteria": "open_rate",
    "variants": [
      {
        "id": "var_a",
        "variantId": "var_a",
        "abTestId": "ab_abc123",
        "label": "A",
        "variantLabel": "A",
        "emailId": "email_abc123",
        "subject": "Welcome",
        "blocks": [
          {
            "id": "block_123",
            "type": "html",
            "content": "<h1>Hello</h1>",
            "styles": {
              "backgroundColor": "#f8fafc",
              "backgroundOpacity": 80,
              "textColor": "#111827",
              "borderRadius": 12,
              "borderColor": "#cbd5e1",
              "borderWidth": 1
            },
            "conditions": [
              {
                "id": "c1",
                "value": "plan:pro"
              }
            ]
          }
        ]
      }
    ]
  }
}

Changes

    • info

      added the optional property ////// to the response with the status

    • warning

      added the new click_rate enum value to the / response property for the response status

    • warning

      added the new event_rate enum value to the / response property for the response status

    • warning

      added the new goal_conversion_rate enum value to the / response property for the response status

    • warning

      added the new goal_value enum value to the / response property for the response status

    • warning

      added the new open_rate enum value to the / response property for the response status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status