{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cooperemail-com/json-schema/cooperemail-com-draft-schema.json",
  "title": "Draft",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cooperemail-com-openapi.yml#/components/schemas/Draft",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "draft"
      ]
    },
    "id": {
      "type": "string"
    },
    "inbox_id": {
      "type": "string"
    },
    "to": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "cc": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "bcc": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "reply_to": {
      "type": [
        "string",
        "null"
      ]
    },
    "subject": {
      "type": "string"
    },
    "text": {
      "type": "string"
    },
    "html": {
      "type": [
        "string",
        "null"
      ]
    },
    "preview": {
      "type": "string"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "in_reply_to": {
      "type": [
        "string",
        "null"
      ]
    },
    "forward_of": {
      "type": [
        "string",
        "null"
      ]
    },
    "reply_all": {
      "type": "boolean"
    },
    "send_status": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "scheduled",
        "sending",
        "failed",
        "blocked",
        null
      ],
      "description": "blocked means the flush refused to send because the key that scheduled the draft was revoked, expired, deleted, or lost message_send and draft_send."
    },
    "send_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When set, the draft is scheduled. Scheduling counts as sending and needs message_send or draft_send."
    },
    "send_error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Why send_status is blocked. Omitted when the draft is not blocked."
    },
    "approval_status": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "pending",
        "approved",
        "rejected",
        null
      ]
    },
    "client_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}