Skip to main content

Create Project

POST/v2/project/{project_key}/projects

Create a new project (website / app) under the same Mida account as the supplied project key. The new project's project_key is auto-generated and returned — use it to install the Mida script on the new site, then mint API keys via the dashboard if needed.

Body​

{
"website_name": "store.example.com",
"allowed_website": "store.example.com"
}
FieldTypeRequiredDescription
website_namestringone of theseDisplay name for the new project
namestringone of theseAlias for website_name
allowed_websitestringone of theseDomain(s) the script may run on. Use * to allow any.

At least one of website_name, name, or allowed_website must be supplied. Anything else in the body is ignored.

Plan limits (free & Agency Lite)​

Sandbox (paid_plan 300) and Agency Lite (paid_plan 305) include 1 project. If the account already has one, this endpoint returns 403 with "code": "project_limit". Inactive projects still count. Deleted projects do not, so deleting a project you no longer use frees the slot.

Accounts that already have more projects than their plan allows keep them. Only creating another one is refused.

Example​

curl -X POST "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/projects" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"website_name": "store.example.com",
"allowed_website": "store.example.com"
}'

Success response (201)​

{
"success": true,
"project": {
"project_key": "PROJECT_KEY_BBBBBBBBBB",
"name": "store.example.com",
"website_name": "store.example.com",
"widget_name": "store.example.com",
"allowed_website": "store.example.com",
"monthly_average_traffic": 0,
"shopify_id": null,
"status": 1,
"company_id": 1001,
"created_at": "2026-04-29T08:14:22.000Z",
"updated_at": "2026-04-29T08:14:22.000Z"
}
}

The returned project_key is the new project's permanent public identifier — it's also the value to put in the Mida script tag (?key=...).

Error responses​

StatusMeaning
400None of website_name, name, or allowed_website supplied
401Invalid or missing API key
403Project supplied as auth context is inactive
403"code": "project_limit": the account already has as many projects as its plan includes. See Plan limits
After creating

The new project does not have its own API key yet. Switch to the new project in the dashboard, then visit app.mida.so/api-keys to generate one before using project-scoped endpoints (experiments, events, goals).