{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usewrit-app/json-schema/usewrit-app-delete-workflow-data-request-schema.json",
  "title": "DeleteWorkflowDataRequest",
  "description": "Body for `DELETE /v1/workflows/{id}/data`. The delete set is `records` ∪ every stored version of each uid in `record_uids`. An empty body deletes nothing (200 with zeros).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usewrit-app-data-api-openapi.yml#/components/schemas/DeleteWorkflowDataRequest",
  "type": "object",
  "properties": {
    "records": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "run_id"
        ],
        "properties": {
          "run_id": {
            "type": "integer",
            "format": "int64"
          },
          "record_index": {
            "type": "integer",
            "default": 0
          }
        }
      }
    },
    "record_uids": {
      "type": "array",
      "description": "Lineage uids — each expands to EVERY stored version.",
      "items": {
        "type": "string"
      }
    },
    "key": {
      "type": [
        "string",
        "null"
      ],
      "description": "Identity pinning echo — the identity fields the uids came from."
    }
  }
}