Delete goals
DELETE https://datafa.st/api/v1/goals
Delete custom goal events by visitor, name, or time range.
Request
Authentication
df_website API key for one website.dft_account token withgoals:write. PasswebsiteIdas a query parameter.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
datafast_visitor_id | string | No | DataFast visitor UUID from the browser cookie or client SDK. Used to attach server-side events to a visitor journey. |
name | string | No | Human-readable name for the resource or event. The exact meaning depends on the endpoint. Delete goals by name. Lowercased and spaces become underscores. |
startAt / endAt | string | Required for bulk delete | Start of the reporting window. Use it with endAt to query a specific date range instead of the endpoint default. Required when deleting without datafast_visitor_id or name. |
start / end | string | No | Optional time range when using visitor or name filters. |
Response
Returns a JSON object with
status and endpoint-specific fields.Response fields
| Field | Type | Description |
|---|---|---|
status | string | success. |
data[].message | string | Human-readable confirmation or status message for the operation. |
data[].datafast_visitor_id | string | DataFast visitor UUID from the browser cookie or client SDK. Used to attach server-side events to a visitor journey. |
data[].goal_name | string | Present when deleting by goal name. |
data[].timeRange.start | string | Present for time range deletes. |
data[].timeRange.end | string | Present for time range deletes. |
Errors
Common errors include
400 for invalid input, 401 for missing or invalid tokens, 403 for missing permission or suspended tracking, 404 for missing resources, and 500 for server errors.