{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dregs-com/json-schema/dregs-com-v1-track-request-schema.json",
  "title": "V1TrackRequest",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dregs-com-openapi.json#/components/schemas/V1TrackRequest",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "minLength": 1
    },
    "data": {
      "type": "object",
      "additionalProperties": {}
    },
    "identity": {
      "$ref": "#/$defs/V1TrackRequestIdentity"
    },
    "groups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V1TrackRequestGroup"
      }
    },
    "device": {
      "$ref": "#/$defs/V1TrackRequestDevice"
    },
    "key": {
      "type": "string"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "source": {
      "type": "string"
    },
    "id": {
      "type": "string",
      "description": "Optional client-supplied event ID for idempotent ingestion. When provided, repeated posts with the same ID are silently deduplicated against the previous event for the customer. Must not start with \"dregs-\" and must be at most 64 characters. When omitted, the server generates a dregs-{UUID} identifier."
    }
  },
  "required": [
    "data",
    "type"
  ],
  "$defs": {
    "V1TrackRequestDevice": {
      "type": "object",
      "properties": {
        "signature": {
          "type": "string"
        },
        "data": {
          "type": "object",
          "additionalProperties": {}
        }
      }
    },
    "V1TrackRequestGroup": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "data": {
          "type": "object",
          "additionalProperties": {}
        }
      }
    },
    "V1TrackRequestIdentity": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "data": {
          "type": "object",
          "additionalProperties": {}
        }
      }
    }
  }
}