{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dregs-com/json-schema/dregs-com-v1-tracked-event-schema.json",
  "title": "V1TrackedEvent",
  "description": "Tracked event information",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dregs-com-openapi.json#/components/schemas/V1TrackedEvent",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "identity": {
      "$ref": "#/$defs/V1Reference"
    },
    "groups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V1GroupReference"
      }
    },
    "fingerprint": {
      "type": "string"
    },
    "session": {
      "type": "string"
    },
    "ip": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "eventSource": {
      "type": "string"
    },
    "eventName": {
      "type": "string"
    },
    "canonicalType": {
      "type": "string",
      "enum": [
        "REGISTRATION",
        "LOGIN",
        "LOGIN_FAILED",
        "LOGOUT",
        "PASSWORD_RESET",
        "PASSWORD_CHANGE",
        "EMAIL_CONFIRMATION",
        "OTP_REQUEST",
        "PROFILE_UPDATE",
        "RESOURCE_CREATE",
        "RESOURCE_UPDATE",
        "RESOURCE_RETRIEVE",
        "RESOURCE_DELETE",
        "MESSAGE_SEND",
        "EMAIL_SEND",
        "INVITATION_SEND",
        "PURCHASE",
        "PAYMENT_ATTEMPT",
        "REFUND_REQUEST",
        "PROMO_REDEEM",
        "PAGE_VIEW",
        "SEARCH",
        "CONTENT_POST",
        "FILE_UPLOAD",
        "MISCELLANEOUS"
      ]
    },
    "eventData": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "$defs": {
    "V1GroupReference": {
      "type": "object",
      "description": "Reference to a group with its type, ID, label, and API path",
      "properties": {
        "type": {
          "type": "string",
          "description": "The group's type, normalized to lower_snake_case"
        },
        "id": {
          "type": "string",
          "description": "The group's ID in your system"
        },
        "label": {
          "type": "string",
          "description": "The group's display name, if known"
        },
        "path": {
          "type": "string",
          "description": "API path to the group resource"
        }
      }
    },
    "V1Reference": {
      "type": "object",
      "description": "Reference to another entity with ID, label, and API path",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the entity"
        },
        "label": {
          "type": "string",
          "description": "Human-readable label or name"
        },
        "path": {
          "type": "string",
          "description": "API path to the entity resource"
        }
      }
    }
  }
}