{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/100hires-com/json-schema/100hires-com-batch-create-messages-request-schema.json",
  "title": "BatchCreateMessagesRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/100hires-com-messages-api-openapi.yml#/components/schemas/BatchCreateMessagesRequest",
  "type": "object",
  "required": [
    "messages"
  ],
  "properties": {
    "messages": {
      "type": "array",
      "maxItems": 100,
      "description": "Array of message payloads to create (max 100).",
      "items": {
        "allOf": [
          {
            "type": "object",
            "required": [
              "candidate_id"
            ],
            "properties": {
              "candidate_id": {
                "type": "integer",
                "description": "Target candidate ID for this message."
              }
            }
          },
          {
            "$ref": "#/$defs/ScheduledEmailCreateRequest"
          }
        ]
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "ScheduledEmailCreateRequest": {
      "type": "object",
      "required": [
        "to",
        "subject",
        "body"
      ],
      "properties": {
        "from_account_id": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Optional sending mail account ID. Use `GET /users/{user_id}/mail-accounts` to list available accounts for a user, or `GET /companies/mail-accounts` to list all accounts. If omitted, the API key owner's default mail account is used."
        },
        "to": {
          "type": "array",
          "description": "Primary recipient email addresses.",
          "items": {
            "type": "string",
            "format": "email"
          }
        },
        "cc": {
          "type": "array",
          "description": "Carbon-copy recipient email addresses.",
          "items": {
            "type": "string",
            "format": "email"
          }
        },
        "bcc": {
          "type": "array",
          "description": "Blind carbon-copy recipient email addresses.",
          "items": {
            "type": "string",
            "format": "email"
          }
        },
        "subject": {
          "type": "string",
          "description": "Email subject line."
        },
        "body": {
          "type": "string",
          "description": "Email body as HTML."
        },
        "scheduled_at": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "Unix timestamp (seconds). If omitted, defaults to created time plus 900 seconds."
        },
        "application_id": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Optional application ID linked to this message."
        },
        "reply_to_email_id": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Optional mailbox message ID to reply to."
        },
        "send_in_new_thread": {
          "type": "boolean",
          "default": false,
          "description": "Whether to send the message as a new thread instead of replying in an existing thread."
        }
      },
      "additionalProperties": false
    }
  }
}