{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/evictionsapi-com/json-schema/evictionsapi-com-intake-file-schema.json",
  "title": "IntakeFile",
  "description": "A file waiting in the organization's intake inbox for a case: a PDF, JPEG or PNG the customer already has, or the plain text of a forwarded email. It waits 30 days, then is deleted unless it was moved onto a case.",
  "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/IntakeFile",
  "type": "object",
  "required": [
    "id",
    "source",
    "filename",
    "contentType",
    "purposeGuess",
    "note",
    "receivedAt",
    "expiresAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "source": {
      "enum": [
        "email",
        "agent"
      ],
      "description": "How it arrived: forwarded by email, or sent through the API (an AI agent or an integration)."
    },
    "filename": {
      "type": "string"
    },
    "contentType": {
      "enum": [
        "application/pdf",
        "image/jpeg",
        "image/png",
        "text/plain"
      ],
      "description": "Decided from the file's first bytes, never from its name. `text/plain` only for the text of a forwarded email, stored by us."
    },
    "purposeGuess": {
      "enum": [
        "lease",
        "ledger",
        "correspondence",
        "other"
      ],
      "description": "What the file is probably for: as sent, or guessed from its name. Confirmed when it is moved onto a case."
    },
    "note": {
      "type": [
        "string",
        "null"
      ],
      "description": "The email's subject or the sender's note; null when none."
    },
    "receivedAt": {
      "type": "string",
      "format": "date-time"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time",
      "description": "When the file is deleted if it has not been moved onto a case."
    }
  }
}