Skip to main content

Get Goal Details

GET/v2/project/{project_key}/goal/{goal_profile_id}

Return the full definition of a single goal profile by its ID.

Path parameters

ParameterDescription
project_keyYour project's API key
goal_profile_idThe numeric goal profile ID (from Create Goal or List Goals)

Example

curl "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/goal/3003" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY"

Success response

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

Response fields

FieldTypeDescription
goal.goal_profile_idintegerUnique goal ID
goal.goal_keystringSlug identifier
goal.goal_namestringDisplay name
goal.goal_typestringConversion type (see Create Goal for all types)
goal.goal_valuestringThe selector, URL, or trigger value
goal.goal_purposestringIntent of the goal
goal.element_urlstring|nullAssociated page URL
goal.statusinteger1 = active, 2 = deleted
goal.created_atstringISO 8601 creation timestamp

Error responses

StatusMeaning
401Invalid or missing API key
404Goal not found or belongs to a different project