{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Draft",
  "title": "Draft",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/send0-dev-openapi.json#/components/schemas/Draft",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "draft"
    },
    "id": {
      "type": "string"
    },
    "inbox_id": {
      "type": "string"
    },
    "thread_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "approved",
        "rejected",
        "sent"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "new",
        "reply",
        "forward"
      ]
    },
    "to": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Mailbox"
      }
    },
    "cc": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Mailbox"
      }
    },
    "bcc": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Mailbox"
      }
    },
    "subject": {
      "type": "string"
    },
    "text": {
      "type": [
        "string",
        "null"
      ]
    },
    "html": {
      "type": [
        "string",
        "null"
      ]
    },
    "decided_by": {
      "type": [
        "string",
        "null"
      ]
    },
    "decided_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "object",
    "id",
    "inbox_id",
    "thread_id",
    "status",
    "kind",
    "to",
    "cc",
    "bcc",
    "subject",
    "text",
    "html",
    "decided_by",
    "decided_at",
    "created_at"
  ],
  "additionalProperties": false,
  "$defs": {
    "Mailbox": {
      "$id": "#/components/schemas/Mailbox",
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "email"
      ],
      "additionalProperties": false
    }
  }
}