"Best analytics tool I've used in 14 years"

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 with goals:write. Pass websiteId as a query parameter.

Query parameters

ParameterTypeRequiredDescription
datafast_visitor_idstringNoDataFast visitor UUID from the browser cookie or client SDK. Used to attach server-side events to a visitor journey.
namestringNoHuman-readable name for the resource or event. The exact meaning depends on the endpoint. Delete goals by name. Lowercased and spaces become underscores.
startAt / endAtstringRequired for bulk deleteStart 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 / endstringNoOptional time range when using visitor or name filters.

Response

Returns a JSON object with status and endpoint-specific fields.

Response fields

FieldTypeDescription
statusstringsuccess.
data[].messagestringHuman-readable confirmation or status message for the operation.
data[].datafast_visitor_idstringDataFast visitor UUID from the browser cookie or client SDK. Used to attach server-side events to a visitor journey.
data[].goal_namestringPresent when deleting by goal name.
data[].timeRange.startstringPresent for time range deletes.
data[].timeRange.endstringPresent 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.

✍️ Something missing? Suggest features.

🤖 AI agent or LLM? Read this page as markdown

Example request
curl -X DELETE "https://datafa.st/api/v1/goals?name=signup&start=2026-05-01T00:00:00Z&end=2026-05-19T23:59:59Z" \
  -H "Authorization: Bearer df_xxx"
Success response
{
  "status": "success",
  "data": [{
    "message": "Goal events deleted successfully within time range",
    "goal_name": "signup",
    "timeRange": {
      "start": "2026-05-01T00:00:00.000Z",
      "end": "2026-05-19T23:59:59.000Z"
    }
  }]
}