Marketing API

Manage A/B testing, analytics, funnels, and ad platform integrations programmatically.

Get your API key

Experiments (A/B Testing)

GET /api/v1/projects/{project_id}/experiments/

List experiments. Filter: ?status=running

POST /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

GET PUT DELETE /api/v1/projects/{project_id}/experiments/{experiment_id}/

Get, update, or delete. Cannot edit/delete running experiments - pause first.

POST /api/v1/projects/{project_id}/experiments/{experiment_id}/start/

Start an experiment.

POST /api/v1/projects/{project_id}/experiments/{experiment_id}/pause/

Pause a running experiment.

Status flow: draftrunningpausedcompleted

GET /api/v1/projects/{project_id}/experiments/{experiment_id}/results/

Get experiment results with visitor counts, conversion rates, statistical significance, and per-goal breakdown.

Analytics

GET /api/v1/projects/{project_id}/analytics/overview/

Get analytics overview: total pageviews, conversions, conversion rate, unique visitors.

Query params: ?date_from=2026-01-01&date_to=2026-04-01

GET /api/v1/projects/{project_id}/analytics/pageviews/

Get pageview data. Filter: ?exclude_bots=true&landing_id=uuid

GET /api/v1/projects/{project_id}/analytics/conversions/

Get conversion analytics.

GET /api/v1/projects/{project_id}/analytics/utm/

Get UTM campaign statistics.

GET /api/v1/projects/{project_id}/analytics/top-pages/

Get top performing pages by views.

Funnels

GET POST /api/v1/projects/{project_id}/funnels/
GET PUT DELETE /api/v1/projects/{project_id}/funnels/{funnel_id}/

Create Funnel

{
  "name": "Lead Gen Funnel",
  "description": "Multi-step lead capture"
}

Funnel Steps

GET POST /api/v1/projects/{project_id}/funnels/{funnel_id}/steps/
PUT DELETE /api/v1/projects/{project_id}/funnels/{funnel_id}/steps/{step_id}/
POST /api/v1/projects/{project_id}/funnels/{funnel_id}/steps/reorder/

Step types: landing | thank_you | appointment | redirect

Funnel Goals

GET POST /api/v1/projects/{project_id}/funnels/{funnel_id}/goals/

Funnel Analytics

GET /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

GET POST /api/v1/projects/{project_id}/ad-platforms/
GET PUT DELETE /api/v1/projects/{project_id}/ad-platforms/{connection_id}/

Platforms: facebook | google | tiktok | linkedin | posthog | webhook

Conversion Goals

GET POST /api/v1/projects/{project_id}/conversion-goals/
GET PUT DELETE /api/v1/projects/{project_id}/conversion-goals/{goal_id}/

Conversion Logs

GET /api/v1/projects/{project_id}/conversion-logs/

Filter: ?status=failed&platform=facebook

POST /api/v1/projects/{project_id}/conversion-logs/{log_id}/retry/

Retry a failed conversion event.