Delete goals
DELETE https://datafa.st/api/v1/goals
Delete custom goal events by visitor ID, event name, or within a time range. Requires Bearer Token authentication.
Query Parameters
Filter Parameters (Optional - at least one required if no time range)
datafast_visitor_id(optional): Delete goals for a specific visitorname(optional): Delete goals with a specific event name (e.g.,signup,purchase)- Will be auto-formatted to lowercase with underscores
Time Range Parameters (Optional)
startAt(optional): ISO 8601 timestamp (e.g.,2023-01-01T00:00:00Z)endAt(optional): ISO 8601 timestamp (e.g.,2023-01-31T23:59:59Z)
⚠️ WARNING: When using
datafast_visitor_id or name WITHOUT time range, ALL matching records across all time will be deleted.Deletion Behavior
- With time range only: Deletes all goals in the specified time range
- With visitor ID only: Deletes all goals for that visitor (across all time)
- With name only: Deletes all goals with that name (across all time)
- With visitor ID + name: Deletes goals matching both criteria
- With time range + filters: Deletes goals matching the filters within the time range
Response
- Success (200 OK): Returns confirmation of deletion.
- Errors: 400 if parameters are invalid, 404 if not found.