Skip to main content

List Goals

GET/v2/project/{project_key}/goals

Return all goal profiles for the selected project. Goals define what counts as a conversion in your experiments.

Query parameters

ParameterTypeDefaultDescription
limitinteger50Max results to return. Maximum 500.
offsetinteger0Number of records to skip (for pagination).

Example

curl "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/goals?limit=50&offset=0" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY"

Success response

{
"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
}
]
}

Response fields

FieldTypeDescription
goalsarrayList of goal profile objects
goals[].goal_profile_idintegerUnique goal ID — use this in other goal endpoints
goals[].goal_keystringSlug identifier for use when referencing goals in experiments
goals[].goal_namestringHuman-readable display name
goals[].goal_typestringThe type of conversion tracked (see Create Goal for all types)
goals[].goal_valuestringThe selector, URL, or value that triggers this goal
goals[].element_urlstring|nullOptional page URL associated with the goal element
countintegerTotal number of goals returned

Error responses

StatusMeaning
401Invalid or missing API key
Next step

Use the goal_key from this list to reference an existing goal when creating an experiment — pass it as primary_goal_key instead of defining the goal inline.