{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/justemails-app/json-schema/justemails-app-email-schema.json",
  "title": "Email",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/justemails-app-openapi.json#/components/schemas/Email",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    },
    "cc": {
      "type": [
        "string",
        "null"
      ]
    },
    "subject": {
      "type": [
        "string",
        "null"
      ]
    },
    "snippet": {
      "type": [
        "string",
        "null"
      ]
    },
    "folder": {
      "type": "string"
    },
    "isRead": {
      "type": "boolean"
    },
    "isStarred": {
      "type": "boolean"
    },
    "isDraft": {
      "type": "boolean"
    },
    "hasAttachments": {
      "type": "boolean"
    },
    "receivedAt": {
      "type": "string",
      "format": "date-time"
    },
    "resurfacedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When a snoozed message last came back to the inbox, or null. receivedAt stays its real date, and API lists stay in receivedAt order; the webmail inbox shows such a message at this time. Returned by the list and search routes."
    },
    "mailboxId": {
      "type": "string",
      "format": "uuid"
    }
  }
}