# start_sales_page_test

Start an A/B test on the guide's link.

`POST /v1/guides/{productId}/sales-page-tests` · MCP tool `start_sales_page_test` · scope `publish` · beta · since 2026-11-27.4

Only when the creator asks you to. Needs a key with the publish option (403 api_scope_required otherwise). Splits the visitors of the guide's own link between version a, the main page as it is, and one to three other versions: other published pages of the guide (kind pages, pages) or the main page with other hero photos (kind hero, heroes). The main page must be live and the guide paid; one test runs at a time (conflict). Visitors see the split within five minutes. Read the results with list_sales_page_tests and end it with end_sales_page_test. Returns the test as list_sales_page_tests does.

## Path parameters

- `productId` (string, required): Id of the guide (a product of type map). From list_guides or create_guide.

## Body parameters

- `kind` (string, required): pages: other published pages against the main page; hero: the main page with other hero photos. One of `pages`, `hero`.
- `heroes` (array of array of strings, optional): kind hero: for each other version (one to three) its hero photos in order, as mediaIds of photos of this guide; no two versions may show the same photos in the same order. A spot's or chapter's photo is copied to the guide's own photos.
- `pages` (array of strings, optional): kind pages: the listingIds of one to three other published pages of the guide (list_sales_pages), versions b, c and d in order.
- `weights` (array of numbers, optional): Optional: each version's share of the visitors in percent, version a first, whole numbers of at least 5 adding up to 100. Absent: an even split.

## Returns

201.

- `testId` (string, required): The test's id.
- `number` (number, required): The test's number within the guide (Test 1, Test 2 ...).
- `kind` (string, required): pages: published pages of the guide against the main page; hero: the main page with other hero photos. One of `pages`, `hero`.
- `status` (string, required): Whether the test still splits the guide link's visitors. One of `running`, `ended`.
- `startedAt` (number, required): When it started (Unix time in milliseconds).
- `endedAt` (number or null, required): When it ended, or null while it runs.
- `keptArm` (string or null, required): The key of the version kept when it ended (a to d), or null while it runs.
- `arms` (array of objects, required): Its versions, A first, with their counts.
  - `key` (string, required): The version's key: a is the main page as it is, b to d the others (end_sales_page_test keep).
  - `weight` (number, required): The version's share of the guide link's visitors, in percent.
  - `label` (string, required): What the studio calls the version: a page's version and name (V2 · TikTok launch), Current photos or Other photos.
  - `listingId` (string or null, required): A test of pages: the version's page; null for a test of hero photos, or once the page was deleted.
  - `photos` (array of strings, required): A test of hero photos: the version's first photos (at most three); [] for a test of pages.
  - `views` (number, required): Page views of this version.
  - `visitors` (number, required): People who saw this version.
  - `checkoutViews` (number, required): Checkouts opened from this version.
  - `payStarts` (number, required): Payments started from this version.
  - `purchases` (number, required): Purchases made from this version that stand (refunds left out).
- `truncated` (boolean, required): true when the test had more purchases than one read counts (5,000): purchases are then a floor.

## Examples

### Test the TikTok page against the main page, half the visitors each

```bash
curl -X POST "https://sceniq.earth/api/v1/guides/j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2/sales-page-tests" \
  -H "Authorization: Bearer $SCENIQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "kind": "pages",
  "pages": [
    "kr7a3c5e7g9j1m3p5s7v9y1b3d5f7h9k"
  ]
}'
```

MCP `tools/call`:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "start_sales_page_test",
    "arguments": {
      "productId": "j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2",
      "kind": "pages",
      "pages": [
        "kr7a3c5e7g9j1m3p5s7v9y1b3d5f7h9k"
      ]
    }
  }
}
```

Response 201:

```json
{
  "testId": "kd7t4w8y2a6c0e4g8j2m6q0s4v8x2z6b",
  "number": 1,
  "kind": "pages",
  "status": "running",
  "startedAt": 1790673240000,
  "endedAt": null,
  "keptArm": null,
  "arms": [
    {
      "key": "a",
      "weight": 50,
      "label": "V1 · Main page",
      "listingId": "kr7w1e3r5t7y9v1j3p5p7a9s1d3f5g7h",
      "photos": [],
      "views": 0,
      "visitors": 0,
      "checkoutViews": 0,
      "payStarts": 0,
      "purchases": 0
    },
    {
      "key": "b",
      "weight": 50,
      "label": "V2 · TikTok launch",
      "listingId": "kr7a3c5e7g9j1m3p5s7v9y1b3d5f7h9k",
      "photos": [],
      "views": 0,
      "visitors": 0,
      "checkoutViews": 0,
      "payStarts": 0,
      "purchases": 0
    }
  ],
  "truncated": false
}
```

### Test two other hero photo orders, a fifth of the visitors each

```bash
curl -X POST "https://sceniq.earth/api/v1/guides/j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2/sales-page-tests" \
  -H "Authorization: Bearer $SCENIQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "kind": "hero",
  "heroes": [
    [
      "kg7t5y7v9j1p3p5a7s9d1f3g5h7j9k1k",
      "kg7q8w6e4r2t0y8v6j4p2p0a8s6d4f2g"
    ],
    [
      "kg7b4n6m8q0w2e4r6t8y0v2j4p6p8a0s",
      "kg7q8w6e4r2t0y8v6j4p2p0a8s6d4f2g"
    ]
  ],
  "weights": [
    60,
    20,
    20
  ]
}'
```

MCP `tools/call`:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "start_sales_page_test",
    "arguments": {
      "productId": "j5738kd1q9x2m7v4c6b8n0p3r5t1w9y2",
      "kind": "hero",
      "heroes": [
        [
          "kg7t5y7v9j1p3p5a7s9d1f3g5h7j9k1k",
          "kg7q8w6e4r2t0y8v6j4p2p0a8s6d4f2g"
        ],
        [
          "kg7b4n6m8q0w2e4r6t8y0v2j4p6p8a0s",
          "kg7q8w6e4r2t0y8v6j4p2p0a8s6d4f2g"
        ]
      ],
      "weights": [
        60,
        20,
        20
      ]
    }
  }
}
```

Response 201:

```json
{
  "testId": "kd7h2k6n0r4v8y2b6e0h4m8q2t6w0z4c",
  "number": 2,
  "kind": "hero",
  "status": "running",
  "startedAt": 1790673240000,
  "endedAt": null,
  "keptArm": null,
  "arms": [
    {
      "key": "a",
      "weight": 60,
      "label": "Current photos",
      "listingId": null,
      "photos": [
        "https://quiet-heron-512.convex.cloud/api/storage/parks-hero.webp",
        "https://quiet-heron-512.convex.cloud/api/storage/tunnel-view-marketing.webp",
        "https://quiet-heron-512.convex.cloud/api/storage/parks-map.webp"
      ],
      "views": 0,
      "visitors": 0,
      "checkoutViews": 0,
      "payStarts": 0,
      "purchases": 0
    },
    {
      "key": "b",
      "weight": 20,
      "label": "Other photos",
      "listingId": null,
      "photos": [
        "https://quiet-heron-512.convex.cloud/api/storage/tunnel-view-marketing.webp",
        "https://quiet-heron-512.convex.cloud/api/storage/parks-hero.webp"
      ],
      "views": 0,
      "visitors": 0,
      "checkoutViews": 0,
      "payStarts": 0,
      "purchases": 0
    },
    {
      "key": "c",
      "weight": 20,
      "label": "Other photos",
      "listingId": null,
      "photos": [
        "https://quiet-heron-512.convex.cloud/api/storage/parks-map.webp",
        "https://quiet-heron-512.convex.cloud/api/storage/parks-hero.webp"
      ],
      "views": 0,
      "visitors": 0,
      "checkoutViews": 0,
      "payStarts": 0,
      "purchases": 0
    }
  ],
  "truncated": false
}
```

## Errors

- `invalid_argument` (400): A required field is missing, a field is unknown, or a value does not match its type (the Convex validator's path and value are in the message).
- `invalid_request` (400): A writer refused a value: a map link on a host that is not allowed, a title that is too long, a date that does not exist, too many items in a list. The message is the writer's own sentence.
- `unauthenticated` (401): The request carries no key. Send it as Authorization: Bearer sk_sceniq_... (or X-Api-Key).
- `invalid_api_key` (401): The key is unknown, revoked or expired.
- `api_scope_required` (403): A read-only key called a write operation, or a key without the publish option called publish_changes.
- `forbidden` (403): The key belongs to a creator account that is no longer active.
- `not_found` (404): The id does not exist or belongs to another creator. The two answers are identical on purpose, so ids never reveal what exists.
- `conflict` (409): The request clashes with the row's current state. The message says what to change.
- `payload_too_large` (413): A JSON body over 2 MB, an image over 6 MB, a batch upload over 19 MB, or an MCP message over 2 MB.
- `rate_limited` (429): Over a limit: requests per key per minute, per creator per hour, uploads per key per minute, or check_links per guide per hour.
- `internal_error` (500): An unexpected failure. The message is hidden on purpose.

Reference: https://developers.sceniq.earth/reference/start_sales_page_test
