Skip to main content

Mida Developer Docs

Mida is an A/B testing and CRO platform. This site covers everything you need to integrate Mida programmatically — whether you're testing changes on a webpage or running experiments inside your backend, API, or mobile app.

New here? Start with the Quickstart

The Quickstart Guide walks you through creating and launching your first experiment end-to-end in under five minutes.

Need something more specific?
  • Server-side SDKs — for backend, API, or mobile app experiments (Node.js, Python, PHP, Ruby, Flutter)
  • MCP Integration — connect Claude, Cursor, or ChatGPT to manage experiments from your AI assistant

REST API V2 reference

The REST API is a control plane — use it to create, configure, and read results for client-side experiments. It is also used for managing goals and events shared across both client-side and server-side experiments.

Server-side experiments are created in the dashboard and run through SDKs. The REST API can read their results and manage their goals, but does not assign variants at request time.


Before you start

1. Find your Project Key

Your Project Key is the unique identifier for your Mida site/project. It appears in:

  • Dashboard → Projects → [your project] → Settings → API
  • The URL when browsing your project: app.mida.so/project/YOUR_PROJECT_KEY/...

The Project Key is passed as a path parameter in every V2 request:

/v2/project/{project_key}/experiments

2. Generate an API Key

API Keys authenticate every request. To create one:

  1. Go to Dashboard → Settings → API Keys
  2. Click Generate New Key
  3. Copy and store it securely — it is only shown once

3. Pick your region

Your account is hosted in either the US or EU region. Use the correct base URL:

RegionBase URL
UShttps://api-us.mida.so/v2
EUhttps://api-eu.mida.so/v2

If you're unsure, check Dashboard → Settings — your region is shown there.


Authentication

Pass your API key in one of these ways (all are equivalent):

# Recommended
Authorization: Bearer YOUR_GENERATED_API_KEY

# Alternatives
x-api-key: YOUR_GENERATED_API_KEY
api-key: YOUR_GENERATED_API_KEY

Example request:

curl "https://api-us.mida.so/v2/project/YOUR_PROJECT_KEY/experiments" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY"

Response format

All responses return JSON. Successful responses include "success": true:

{ "success": true, "experiments": [...] }

Error responses include an "error" key and an appropriate HTTP status code:

{ "error": "Experiment not found" }

Common status codes

CodeMeaning
200Success
400Bad request — check request body or parameters
401Invalid or missing API key
404Resource not found, or belongs to a different project
500Server error

Endpoints at a glance

Experiments

MethodEndpointDescription
POST/v2/project/{project_key}/create-experimentCreate an experiment
GET/v2/project/{project_key}/experimentsList all experiments
GET/v2/project/{project_key}/experiment/{test_id}Get experiment details
GET/v2/project/{project_key}/experiment/{test_id}/resultGet conversion results
GET/v2/project/{project_key}/experiment/{test_id}/share-linkGet public share link
PATCH/v2/project/{project_key}/experiment/{test_id}Update metadata/config
PATCH/v2/project/{project_key}/experiment/{test_id}/statusStart / pause / end

Events

MethodEndpointDescription
GET/v2/project/{project_key}/eventsList events
POST/v2/project/{project_key}/eventCreate an event
GET/v2/project/{project_key}/event/{event_id}Get event details
PATCH/v2/project/{project_key}/event/{event_id}Update an event
DELETE/v2/project/{project_key}/event/{event_id}Delete an event

Goals

MethodEndpointDescription
GET/v2/project/{project_key}/goalsList goals
POST/v2/project/{project_key}/goalCreate a goal
GET/v2/project/{project_key}/goal/{goal_profile_id}Get goal details
PATCH/v2/project/{project_key}/goal/{goal_profile_id}Update a goal
DELETE/v2/project/{project_key}/goal/{goal_profile_id}Delete a goal