{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/prodantix-com/json-schema/prodantix-com-email-dto-schema.json",
  "title": "EmailDto",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/prodantix-com-openapi.json#/components/schemas/EmailDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "projectId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "`regular` for a campaign sent to its cohorts, `automated` for one\nworkflows send one person at a time."
    },
    "status": {
      "type": "string",
      "description": "`draft`, `awaiting_approval`, `scheduled`, `sending`, `paused`, `sent` or `cancelled`."
    },
    "fromDomain": {
      "type": "string"
    },
    "fromLocal": {
      "type": "string"
    },
    "fromName": {
      "type": "string"
    },
    "replyTo": {
      "type": "string"
    },
    "subscriptionTypeId": {
      "type": [
        "string",
        "null"
      ]
    },
    "language": {
      "type": "string"
    },
    "content": {
      "description": "The versions, each with its subject, preview line and blocks."
    },
    "test": {
      "description": "The test: its kind (`none`, `ab` or `adaptive`), share, measure and window."
    },
    "send": {
      "description": "When it goes: its mode (`now`, `at`, `recipient_zone` or `optimised`) and moment."
    },
    "recipients": {
      "description": "The cohorts it goes to and leaves out."
    },
    "approval": {
      "description": "Who asked for approval and who gave or refused it."
    },
    "skipped": {
      "description": "How many were left out when sending started, by reason."
    },
    "sentVersion": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32"
    },
    "winner": {
      "type": [
        "string",
        "null"
      ]
    },
    "recipientCount": {
      "type": "integer",
      "format": "int32"
    },
    "scheduledAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "startedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "sentAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdBy": {
      "type": "string"
    },
    "updatedBy": {
      "type": "string"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "projectId",
    "name",
    "kind",
    "status",
    "fromDomain",
    "fromLocal",
    "fromName",
    "replyTo",
    "language",
    "content",
    "test",
    "send",
    "recipients",
    "approval",
    "skipped",
    "recipientCount",
    "createdBy",
    "updatedBy",
    "createdAt",
    "updatedAt"
  ]
}