{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/100hires-com/json-schema/100hires-com-notification-message-schema.json",
  "title": "NotificationMessage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/100hires-com-notification-messages-api-openapi.yml#/components/schemas/NotificationMessage",
  "type": "object",
  "required": [
    "id",
    "from",
    "to",
    "subject",
    "body",
    "date",
    "schedule"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "description": "Message ID."
    },
    "from": {
      "type": "string",
      "description": "Sender address."
    },
    "to": {
      "type": "string",
      "description": "Recipient address."
    },
    "subject": {
      "type": "string",
      "description": "Message subject."
    },
    "body": {
      "type": "string",
      "description": "Message body as HTML that is safe to render. The markup of the email is kept after sanitizing."
    },
    "date": {
      "type": "string",
      "description": "Message date."
    },
    "schedule": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            ""
          ]
        },
        {
          "$ref": "#/$defs/NotificationMessageSchedule"
        }
      ]
    }
  },
  "additionalProperties": false,
  "$defs": {
    "NotificationMessageSchedule": {
      "type": "object",
      "required": [
        "id",
        "isScheduled",
        "isFailed",
        "humanDatetime",
        "isNotificationMessage"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "description": "Schedule ID."
        },
        "isScheduled": {
          "type": "boolean",
          "description": "Whether currently scheduled."
        },
        "isFailed": {
          "type": "boolean",
          "description": "Whether send failed."
        },
        "humanDatetime": {
          "type": "string",
          "description": "Human-readable scheduled time."
        },
        "isNotificationMessage": {
          "type": "boolean",
          "description": "Always true for notification messages."
        }
      },
      "additionalProperties": false
    }
  }
}