{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/evictionsapi-com/json-schema/evictionsapi-com-document-schema.json",
  "title": "Document",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/evictionsapi-com-openapi-openapi.json#/components/schemas/Document",
  "type": "object",
  "required": [
    "id",
    "kind",
    "filename",
    "contentHash"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "kind": {
      "enum": [
        "evidence",
        "notice",
        "filing",
        "proof",
        "other"
      ]
    },
    "specId": {
      "type": [
        "string",
        "null"
      ]
    },
    "purpose": {
      "enum": [
        "authority",
        "prior_notice",
        "prior_notice_proof",
        "other",
        "lease",
        "ledger",
        "correspondence",
        null
      ],
      "description": "What an uploaded file (`kind: \"evidence\"`) is for, as given with the upload. Null for documents the platform or the attorney adds, and for files uploaded before purposes were kept."
    },
    "filename": {
      "type": "string"
    },
    "contentType": {
      "enum": [
        "application/pdf",
        "image/jpeg",
        "image/png",
        "text/plain"
      ],
      "description": "Decided from the file's first bytes when it was stored, never from its name. `text/plain` only for a `correspondence` document that is plain text (the body of a forwarded email)."
    },
    "contentHash": {
      "type": "string",
      "description": "SHA-256 of the document bytes. An attorney approval names these."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}