Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.elasticfunnels.io/llms.txt

Use this file to discover all available pages before exploring further.

All split test endpoints authenticate via EF-Access-Key with brandAccess middleware. Request bodies are nested under a split_test key.

List Split Tests

GET /api/brands/{brand}/split-tests
brand
string
required
The brand/project ID
per_page
number
Results per page (1–100, default: 25)
status
string
Filter by status: running, paused, finalized, deleted
cURL
curl "https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests?status=running" \
  -H "EF-Access-Key: your_api_key_here"
{
  "current_page": 1,
  "data": [
    {
      "id": 7,
      "name": "Headline Test — Hero Section",
      "type": "split_test",
      "status": "running",
      "page_id": 101,
      "funnel_id": null,
      "start_date": "2024-12-01",
      "end_date": "2024-12-31",
      "duration": 30,
      "auto_select_winner": false,
      "winner_selection_criteria": null,
      "winner_selection_confidence": 95,
      "sample_size_limit": null,
      "baseline": "control",
      "views": 4820,
      "time_left": "20 days",
      "user": { "id": 1, "name": "Sam" },
      "page": { "id": 101, "title": "Nutra Landing Page" },
      "funnel": null,
      "created_at": "2024-12-01T10:00:00.000000Z"
    }
  ],
  "per_page": 25,
  "total": 3,
  "last_page": 1
}

Get Split Test

GET /api/brands/{brand}/split-tests/{split_test}
brand
string
required
The brand/project ID
split_test
string
required
Split test ID
cURL
curl https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests/7 \
  -H "EF-Access-Key: your_api_key_here"
{
  "id": 7,
  "name": "Headline Test — Hero Section",
  "type": "split_test",
  "status": "running",
  "page_id": 101,
  "funnel_id": null,
  "start_date": "2024-12-01",
  "end_date": "2024-12-31",
  "statistical_method": "frequentist",
  "significance_level": 0.05,
  "statistical_power": 0.8,
  "primary_metric": "conversion_rate",
  "config": {
    "items": [
      { "name": "Control", "node_code": "ctrl-abc123", "weight": 50 },
      { "name": "Variant B", "node_code": "var-def456", "weight": 50 }
    ]
  },
  "winner": null,
  "goals": [
    { "name": "Purchase", "value": "purchase" }
  ],
  "created_at": "2024-12-01T10:00:00.000000Z",
  "updated_at": "2024-12-10T15:30:00.000000Z"
}

Create Split Test

POST /api/brands/{brand}/split-tests
All body fields must be nested under the split_test key (e.g. split_test.name, split_test.config).
brand
string
required
The brand/project ID
split_test.name
string
required
Human-readable name for the test
split_test.type
string
required
split_test (funnel/page variants) or component_split_test (component-level test)
split_test.config
object
required
Test configuration including items array. Each item has name, node_code, and weight.
split_test.status
string
running, paused, completed, deleted (default: running)
split_test.start_date
string
ISO 8601 date (default: today)
split_test.end_date
string
ISO 8601 date
split_test.primary_metric
string
Primary metric to optimise for (e.g. conversion_rate, revenue)
split_test.statistical_method
string
frequentist (default) or bayesian
split_test.significance_level
number
Alpha level (0.001–0.5, default: 0.05)
split_test.statistical_power
number
Beta level (0.1–0.99, default: 0.8)
split_test.min_sample_size_per_variant
number
Minimum visitors per variant before declaring a winner (100–1,000,000)
split_test.auto_select_winner
boolean
Automatically select winner when confidence threshold is reached
split_test.winner_selection_confidence
number
Confidence % required for auto-winner selection (e.g. 95)
split_test.goals
array
Conversion goal events. Each goal has name (string) and value (alphanumeric slug).
split_test.baseline
string
The control variant’s name or node code
cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "split_test": {
      "name": "Headline Test — Hero Section",
      "type": "split_test",
      "status": "running",
      "page_id": 101,
      "primary_metric": "conversion_rate",
      "significance_level": 0.05,
      "winner_selection_confidence": 95,
      "start_date": "2024-12-01",
      "end_date": "2024-12-31",
      "goals": [
        { "name": "Purchase", "value": "purchase" }
      ],
      "config": {
        "items": [
          { "name": "Control",   "node_code": "ctrl-abc123", "weight": 50 },
          { "name": "Variant B", "node_code": "var-def456",  "weight": 50 }
        ]
      }
    }
  }'
{
  "id": 7,
  "name": "Headline Test — Hero Section",
  "type": "split_test",
  "status": "running",
  "page_id": 101,
  "brand_id": 42,
  "start_date": "2024-12-01",
  "end_date": "2024-12-31",
  "primary_metric": "conversion_rate",
  "significance_level": 0.05,
  "statistical_method": "frequentist",
  "winner_selection_confidence": 95,
  "config": {
    "items": [
      { "name": "Control",   "node_code": "ctrl-abc123", "weight": 50 },
      { "name": "Variant B", "node_code": "var-def456",  "weight": 50 }
    ]
  },
  "goals": [{ "name": "Purchase", "value": "purchase" }],
  "created_at": "2024-12-01T10:00:00.000000Z"
}

Update Split Test

PUT /api/brands/{brand}/split-tests/{split_test}
Same body structure as Create — all fields nested under split_test, all optional on update except as noted. To pause a running test: set split_test.status to paused.
cURL — pause a running test
curl -X PUT https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests/7 \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"split_test": {"status": "paused"}}'
cURL — extend end date
curl -X PUT https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests/7 \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"split_test": {"end_date": "2025-01-15"}}'
{
  "id": 7,
  "name": "Headline Test — Hero Section",
  "status": "paused",
  "end_date": "2025-01-15",
  "updated_at": "2024-12-11T09:00:00.000000Z"
}

Delete Split Test

DELETE /api/brands/{brand}/split-tests/{split_test}
cURL
curl -X DELETE https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests/7 \
  -H "EF-Access-Key: your_api_key_here"
{
  "message": "Split test deleted successfully."
}

Get Chart Data

Retrieve time-series and comparison data for visualisations.
GET /api/brands/{brand}/split-tests/{split_test}/chart-data
split_test
string
required
Split test ID
chart_type
string
required
One of: conversion_trends, funnel_analysis, statistical_confidence, performance_comparison
start
string
Start date (ISO 8601)
end
string
End date (ISO 8601)
tz
string
Timezone (e.g. America/New_York)
cURL
curl "https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests/7/chart-data?chart_type=conversion_trends&start=2024-12-01&end=2024-12-10" \
  -H "EF-Access-Key: your_api_key_here"
{
  "chart_type": "conversion_trends",
  "labels": ["Dec 1", "Dec 2", "Dec 3"],
  "datasets": [
    {
      "label": "Control",
      "data": [0.031, 0.033, 0.029],
      "node_code": "ctrl-abc123"
    },
    {
      "label": "Variant B",
      "data": [0.038, 0.041, 0.039],
      "node_code": "var-def456"
    }
  ]
}

Declare Winner

Manually select the winning variant and finalize the test. Sets status to finalized.
POST /api/brands/{brand}/split-tests/{split_test}/declare-winner
winner_node_code
string
required
The node_code of the winning variant
variant_name
string
required
Display name of the winning variant
confidence
number
Statistical confidence at time of declaration (0–100)
improvement
number
Relative lift over baseline (e.g. 25.8 for 25.8% improvement)
reason
string
Free-text note for the decision (max 500 chars)
cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests/7/declare-winner \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "winner_node_code": "var-def456",
    "variant_name": "Variant B",
    "confidence": 87.4,
    "improvement": 25.8,
    "reason": "Strong uplift on mobile; acceptable confidence given campaign deadline."
  }'
{
  "message": "Winner declared successfully",
  "split_test": {
    "id": 7,
    "status": "finalized",
    "winner_selected_at": "2024-12-11T09:15:00.000000Z",
    "winner_selected_by": "manual"
  },
  "winner": {
    "variant": "Variant B",
    "node_code": "var-def456",
    "confidence": 87.4,
    "improvement": 25.8
  }
}

Export Results

Queue a CSV/Excel export of all split test results. An email is sent when ready.
POST /api/brands/{brand}/split-tests/{split_test}/export
format
string
csv (default) or excel
include_statistics
boolean
Include p-values, confidence intervals, lift (default: true)
include_confidence_intervals
boolean
Include CI columns (default: false)
date_range
object
Optional {start, end} to restrict export date range
cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests/7/export \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"format": "csv", "include_statistics": true}'
{
  "message": "Export has been queued. You will receive an email when it's ready.",
  "status": "queued",
  "split_test_name": "Headline Test — Hero Section"
}

Get Node Codes

Return the variant names and node_code identifiers for a split test — useful for linking analytics filter calls.
GET /api/brands/{brand}/split-tests/{split_test}/node-codes
cURL
curl https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests/7/node-codes \
  -H "EF-Access-Key: your_api_key_here"
[
  { "code": "ctrl-abc123", "name": "Control" },
  { "code": "var-def456",  "name": "Variant B" }
]

Quick Access Stats

Counts by status — useful for dashboard badges.
GET /api/brands/{brand}/split-tests/quick-access
cURL
curl https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests/quick-access \
  -H "EF-Access-Key: your_api_key_here"
{
  "all": 12,
  "running": 3,
  "finalized": 7,
  "not_running": 2
}

Notes

Add freeform notes to a split test for team collaboration.

List notes

GET /api/brands/{brand}/split-tests/{split_test}/notes

Add note

POST /api/brands/{brand}/split-tests/{split_test}/notes
content
string
required
Note text

Delete note

DELETE /api/brands/{brand}/split-tests/{split_test}/notes/{note}
cURL — add note
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/split-tests/7/notes \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"content": "Pausing — holiday traffic skewing mobile numbers."}'
{
  "id": 3,
  "split_test_id": 7,
  "content": "Pausing — holiday traffic skewing mobile numbers.",
  "user": { "id": 1, "name": "Sam" },
  "created_at": "2024-12-11T09:30:00.000000Z"
}

Using Split Test Data with Analytics

To filter analytics metrics by split test variant, pass the split_test_id and filter[node_code] to the analytics endpoints:
# Metrics for a specific variant
GET /api/brands/{brand}/analytics/metrics/data
  ?start=2024-12-01T00:00:00Z
  &end=2024-12-10T23:59:59Z
  &selected_metrics[]=conversion_rate&selected_metrics[]=revenue
  &split_test_id=7
  &filter[node_code]=var-def456
# Compare metrics across all variants grouped by node_code
GET /api/brands/{brand}/analytics/metrics/node_code/data
  ?start=2024-12-01T00:00:00Z
  &end=2024-12-10T23:59:59Z
  &selected_metrics[]=conversion_rate
  &split_test_id=7