Mida Goals API
The Goals API from Mida — 3 operation(s) for goals.
The Goals API from Mida — 3 operation(s) for goals.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/mida-so:mida-so-goals-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Mida Goals API
version: 2.0.0
description: 'Manage Mida A/B tests, goals, events, hypotheses, surveys and personalization campaigns. Accounts live in one region: call the US or EU server your account is hosted in (Dashboard → Settings shows which). Generated from https://docs.mida.so.'
contact:
name: Mida
url: https://www.mida.so
servers:
- url: https://api-us.mida.so
description: US region
- url: https://api-eu.mida.so
description: EU region
security:
- bearerAuth: []
- apiKeyHeader: []
tags:
- name: Goals
paths:
/v2/project/{project_key}/goal:
post:
operationId: createGoal
summary: Create Goal
description: 'Create a goal profile for the selected project. Goals define what counts as a conversion: page visits, clicks, forms, scroll depth, events, revenue, or manual triggers.'
tags:
- Goals
externalDocs:
url: https://docs.mida.so/docs/v2/create-goal
parameters:
- name: project_key
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
goal_name:
type: string
description: Human-readable name for the goal (e.g., `"Signup Form Submit"`)
goal_type:
type: string
description: The type of conversion to track (see table below)
goal_value:
type: string
description: The selector, URL, text, or trigger value (depends on `goal_type`)
goal_key:
type: string
description: Slug identifier (auto-generated if omitted). Must be unique per project.
goal_purpose:
type: string
description: 'Intent of the goal. Default: `"sell"`. Other values: `"engage"`, `"generate"`.'
element_url:
type: string
description: The page URL where the element or form is located. Helps the Mida script know which page to listen on.
required:
- goal_name
- goal_type
- goal_value
example:
goal_name: CTA Button Click
goal_type: clickOnElement
goal_value: .cta-button
goal_purpose: sell
element_url: https://example.com/
responses:
'200':
description: Success
content:
application/json:
example:
success: true
goal_profile_id: 3003
goal_key: cta_button_click
company_id: 1001
'401':
description: Missing or invalid API key
/v2/project/{project_key}/goal/{goal_profile_id}:
delete:
operationId: deleteGoal
summary: Delete Goal
description: Soft-delete a goal profile. The record is preserved in the database but will no longer appear in the Goals list or be selectable for new experiments.
tags:
- Goals
externalDocs:
url: https://docs.mida.so/docs/v2/delete-goal
parameters:
- name: project_key
in: path
required: true
schema:
type: string
description: Your project's API key
- name: goal_profile_id
in: path
required: true
schema:
type: integer
description: The numeric goal profile ID to delete
responses:
'200':
description: Success
content:
application/json:
example:
success: true
goal_profile_id: 3003
deleted: true
'401':
description: Missing or invalid API key
get:
operationId: getGoalDetails
summary: Get Goal Details
description: Return the full definition of a single goal profile by its ID.
tags:
- Goals
externalDocs:
url: https://docs.mida.so/docs/v2/get-goal-details
parameters:
- name: project_key
in: path
required: true
schema:
type: string
description: Your project's API key
- name: goal_profile_id
in: path
required: true
schema:
type: integer
description: The numeric goal profile ID (from Create Goal or List Goals)
responses:
'200':
description: Success
content:
application/json:
example:
success: true
goal:
goal_profile_id: 3003
goal_key: cta_button_click
goal_name: CTA Button Click
goal_type: clickOnElement
goal_value: .cta-button
goal_purpose: sell
element_url: https://example.com/
status: 1
created_at: '2024-01-15T10:30:00.000Z'
'401':
description: Missing or invalid API key
patch:
operationId: updateGoal
summary: Update Goal
description: Update fields on a goal profile. Only the fields you include are changed — all other fields remain unchanged.
tags:
- Goals
externalDocs:
url: https://docs.mida.so/docs/v2/update-goal
parameters:
- name: project_key
in: path
required: true
schema:
type: string
description: Your project's API key
- name: goal_profile_id
in: path
required: true
schema:
type: integer
description: The numeric goal profile ID
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
goal_name:
type: string
description: Rename the goal
goal_type:
type: string
description: Change the conversion type
goal_value:
type: string
description: Change the selector, URL, or trigger value
goal_purpose:
type: string
description: Update the intent (`"sell"`, `"engage"`, `"generate"`)
goal_key:
type: string
description: Change the slug (must remain unique per project)
element_url:
type: string
description: Update the associated page URL
example:
goal_name: CTA Button Click — Above Fold
goal_value: .cta-button.above-fold
responses:
'200':
description: Success
content:
application/json:
example:
success: true
goal_profile_id: 3003
'401':
description: Missing or invalid API key
/v2/project/{project_key}/goals:
get:
operationId: listGoals
summary: List Goals
description: Return all goal profiles for the selected project. Goals define what counts as a conversion in your experiments.
tags:
- Goals
externalDocs:
url: https://docs.mida.so/docs/v2/list-goals
parameters:
- name: project_key
in: path
required: true
schema:
type: string
- name: limit
in: query
required: false
schema:
type: integer
default: '50'
description: Max results to return. Maximum `500`.
- name: offset
in: query
required: false
schema:
type: integer
default: '0'
description: Number of records to skip (for pagination).
responses:
'200':
description: Success
content:
application/json:
example:
success: true
company_id: 1001
count: 2
goals:
- goal_profile_id: 3003
goal_key: cta_button_click
goal_name: CTA Button Click
goal_type: clickOnElement
goal_value: .cta-button
goal_purpose: sell
element_url: https://example.com/
- goal_profile_id: 3004
goal_key: signup_page_view
goal_name: Signup Page View
goal_type: pageview
goal_value: https://example.com/signup
goal_purpose: sell
element_url: null
'401':
description: Missing or invalid API key
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'An API key generated in the Mida dashboard, sent as `Authorization: Bearer <key>`.'
apiKeyHeader:
type: apiKey
in: header
name: x-api-key
description: 'The same API key, sent as `x-api-key: <key>`.'
externalDocs:
url: https://docs.mida.so/docs/intro