Marketing API
Manage A/B testing, analytics, funnels, and ad platform integrations programmatically.
Get your API keyExperiments (A/B Testing)
/api/v1/projects/{project_id}/experiments/
List experiments. Filter: ?status=running
/api/v1/projects/{project_id}/experiments/
Create an A/B test experiment.
{
"name": "Homepage CTA Test",
"description": "Testing red vs blue CTA button",
"control_landing": "uuid-of-control-page",
"variant_landing": "uuid-of-variant-page",
"variant_weight": 50,
"goals": [
{"name": "Form Submit", "goal_type": "form_submit", "is_primary": true}
]
}
Goal types: form_submit | click | time_on_page | scroll_depth | custom_event
/api/v1/projects/{project_id}/experiments/{experiment_id}/
Get, update, or delete. Cannot edit/delete running experiments - pause first.
/api/v1/projects/{project_id}/experiments/{experiment_id}/start/
Start an experiment.
/api/v1/projects/{project_id}/experiments/{experiment_id}/pause/
Pause a running experiment.
Status flow: draft → running ↔ paused → completed
/api/v1/projects/{project_id}/experiments/{experiment_id}/results/
Get experiment results with visitor counts, conversion rates, statistical significance, and per-goal breakdown.
Analytics
/api/v1/projects/{project_id}/analytics/summary/
Standard analytics endpoint — the same numbers as the dashboard: visitors (distinct daily visitor id), page views and leads with the change vs the previous period, per-day series, top pages, sources, UTM campaigns, devices, countries and, for shops, orders and revenue. Bots never count. MCP: escalateflow_analytics_summary.
Period (all analytics endpoints): ?days=7, ?period=7d (same) or ?date_from=2026-11-01&date_to=2026-11-07 (whole days, date_to inclusive). Default: last 30 days. Max 365 days.
/api/v1/projects/{project_id}/analytics/pageviews/
The individual page views behind summary (bots excluded), newest first. Filters: ?path=/pricing/, ?utm_source=google, limit/offset.
/api/v1/projects/{project_id}/analytics/conversions/
The leads behind summary.totals.leads (form submissions of this website, bots excluded).
/api/v1/projects/{project_id}/analytics/overview/ Deprecated · removed 2026-12-14
Old name of summary: its totals as total_pageviews, unique_visitors, total_conversions, conversion_rate. Answers with Deprecation/Sunset headers. Use summary.
/api/v1/projects/{project_id}/analytics/top-pages/ Deprecated · removed 2026-12-14
Same as summary.top_pages. Use summary.
/api/v1/projects/{project_id}/analytics/utm/ Deprecated · removed 2026-12-14
Per-campaign views/visitors/leads (same source as summary.utm_sources/campaigns). Use summary.
Funnels
/api/v1/projects/{project_id}/funnels/
/api/v1/projects/{project_id}/funnels/{funnel_id}/
Create Funnel
{
"name": "Lead Gen Funnel",
"description": "Multi-step lead capture"
}
Funnel Steps
/api/v1/projects/{project_id}/funnels/{funnel_id}/steps/
/api/v1/projects/{project_id}/funnels/{funnel_id}/steps/{step_id}/
/api/v1/projects/{project_id}/funnels/{funnel_id}/steps/reorder/
Step types: landing | thank_you | appointment | redirect
Funnel Goals
/api/v1/projects/{project_id}/funnels/{funnel_id}/goals/
Funnel Analytics
/api/v1/projects/{project_id}/funnels/{funnel_id}/analytics/
Returns total visitors, conversions, conversion rate, and per-step breakdown.
Ad Platforms & Conversions
Ad Platform Connections
/api/v1/projects/{project_id}/ad-platforms/
/api/v1/projects/{project_id}/ad-platforms/{connection_id}/
Platforms: facebook | google | tiktok | linkedin | posthog | webhook
Conversion Goals
/api/v1/projects/{project_id}/conversion-goals/
/api/v1/projects/{project_id}/conversion-goals/{goal_id}/
Conversion Logs
/api/v1/projects/{project_id}/conversion-logs/
Filter: ?status=failed&platform=facebook
/api/v1/projects/{project_id}/conversion-logs/{log_id}/retry/
Retry a failed conversion event.