Endpoint
Authentication
Requires a Plugins API token with write access.Bearer token for authentication
Path Parameters
The unique ID of the goal to deleteExample:
123Response
On successful deletion, returns a204 No Content status with an empty response body.
Status Codes
204 No Content- Goal deleted successfully401 Unauthorized- Missing or invalid API token404 Not Found- Goal with specified ID not found
Funnel Behavior
When deleting a goal that belongs to one or more funnels:- If the funnel has more than the minimum steps (2): The step associated with the deleted goal is removed, and the funnel continues to exist with the remaining steps.
- If the funnel has exactly the minimum steps (2): The entire funnel is deleted along with the goal, as a funnel cannot exist with fewer than 2 steps.
Examples
Delete a Goal
Error: Goal Not Found
Bulk Delete Goals
Request Body
Array of goal IDs to deleteExample:
[123, 124, 125]Examples
Delete All Goals for a Site
Notes
- Deletion is permanent and cannot be undone
- Historical event data is not affected - only the goal definition is removed
- Deleting a goal removes it from all associated funnels
- If a funnel has only 2 steps and one goal is deleted, the entire funnel is removed
- Goals can only be deleted for sites you have access to via your API token
- Non-existent goal IDs in bulk delete operations are silently ignored
Related Endpoints
- List Goals - Retrieve all goals to find IDs
- Create Goal - Create a new goal