create_ab_test
Create one A/B test variant for a campaign; call again with a distinct label to build a split, with optional automatic winner selection.
Instructions
Create one A/B test variant on a campaign. The real API stores a single variant per call, so build a test by calling this once per variant (e.g. twice for a plain A/B split) using the same campaign_id and distinct variant labels. Each variant gets send_percent of the audience; auto_select_winner (with winner_wait_hours) can pick and send the winner automatically, or use select_ab_test_winner to do it manually.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"campaign_id": "<campaign_id>",
"variant": "<variant>"
},
"name": "create_ab_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subject | No | Subject line for subject tests | |
| variant | Yes | Variant label, e.g. 'A' or 'B' (max 5 chars) | |
| body_html | No | Body HTML for content tests | |
| from_name | No | Sender name for from_name tests | |
| preheader | No | Preheader text for preheader tests | |
| test_type | No | What this variant differs on (default: content) | |
| campaign_id | Yes | Campaign to test (UUID) | |
| send_time_a | No | ISO timestamp for this variant's send_time slot A | |
| send_time_b | No | ISO timestamp for this variant's send_time slot B | |
| send_percent | No | Percent of the audience that receives this variant (1-99, default 50) | |
| winner_wait_hours | No | Hours to wait before auto-selecting a winner (1-168, default 4) | |
| auto_select_winner | No | Automatically select and send the winner after winner_wait_hours (default false) |