{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cherami-to/json-schema/cherami-to-reply-input-schema.json",
  "title": "ReplyInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cherami-to-sending-api-openapi.yml#/components/schemas/ReplyInput",
  "type": "object",
  "properties": {
    "message_id": {
      "type": "string",
      "description": "ID of a ready received message or an accepted sent message in this inbox that has a Message-ID header.",
      "pattern": "^[a-f0-9-]{36}$"
    },
    "text": {
      "type": "string",
      "description": "Nonblank reply text; quoted history isn't added."
    },
    "html": {
      "type": "string",
      "description": "HTML alternative, sent as supplied."
    },
    "attachments": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AttachmentInput"
          },
          "maxItems": 32
        },
        {
          "type": "null"
        }
      ],
      "description": "Omitted, null or [] means no attachments."
    },
    "labels": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Label"
      },
      "maxItems": 32,
      "description": "Label names, case-sensitive; order and duplicates don't matter."
    },
    "idempotency_key": {
      "type": "string",
      "description": "Your unique value for this one operation. Save it with the exact request before sending; repeating that request with the same key within 24 hours returns what the first one did instead of acting again.",
      "pattern": "^[A-Za-z0-9_-]{1,128}$"
    }
  },
  "required": [
    "message_id",
    "text"
  ],
  "additionalProperties": false,
  "$defs": {
    "AttachmentInput": {
      "type": "object",
      "properties": {
        "filename": {
          "type": "string",
          "description": "At most 255 UTF-8 bytes, without control characters, slashes or backslashes.",
          "minLength": 1,
          "x-max-utf8-bytes": 255
        },
        "type": {
          "type": "string",
          "description": "MIME type without parameters.",
          "maxLength": 127,
          "pattern": "^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$"
        },
        "content": {
          "type": "string",
          "description": "The file's bytes as padded base64, without line breaks.",
          "contentEncoding": "base64",
          "pattern": "^[A-Za-z0-9+/]*={0,2}$"
        }
      },
      "required": [
        "filename",
        "type",
        "content"
      ],
      "additionalProperties": false
    },
    "Label": {
      "type": "string",
      "description": "1–128 UTF-8 bytes after trimming, without control characters; case-sensitive.",
      "x-max-utf8-bytes": 128
    }
  }
}