{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendforme/json-schema/sendforme-letter-schema.json",
  "title": "Letter",
  "x-generated": "2026-12-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendforme-openapi.json#/components/schemas/Letter",
  "type": "object",
  "properties": {
    "to": {
      "type": "object",
      "description": "name or company is required too (who it goes to or is from). A one-line US address string also works where the MCP tools take one.",
      "properties": {
        "name": {
          "type": "string"
        },
        "company": {
          "type": "string"
        },
        "line1": {
          "type": "string"
        },
        "line2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        },
        "country": {
          "type": "string",
          "description": "ISO 2-letter, default US"
        }
      },
      "required": [
        "line1"
      ]
    },
    "from": {
      "type": "object",
      "description": "name or company is required too (who it goes to or is from). A one-line US address string also works where the MCP tools take one.",
      "properties": {
        "name": {
          "type": "string"
        },
        "company": {
          "type": "string"
        },
        "line1": {
          "type": "string"
        },
        "line2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        },
        "country": {
          "type": "string",
          "description": "ISO 2-letter, default US"
        }
      },
      "required": [
        "line1"
      ]
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "name or company is required too (who it goes to or is from). A one-line US address string also works where the MCP tools take one.",
        "properties": {
          "name": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "country": {
            "type": "string",
            "description": "ISO 2-letter, default US"
          }
        },
        "required": [
          "line1"
        ]
      },
      "description": "Mail merge (instead of to)"
    },
    "body": {
      "type": "string",
      "description": "Letter text, markdown. Only the body: no addresses, date or signature."
    },
    "pdf": {
      "type": "string",
      "description": "Upload id (f_...), https URL, or base64"
    },
    "attachments": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "subject": {
      "type": "string"
    },
    "references": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "salutation": {
      "type": "string"
    },
    "closing": {
      "type": "string"
    },
    "signature": {
      "type": "string",
      "enum": [
        "script",
        "handwritten",
        "typed",
        "image",
        "none"
      ]
    },
    "signer_name": {
      "type": "string"
    },
    "signer_title": {
      "type": "string"
    },
    "enclosures": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "cc": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "postscript": {
      "type": "string"
    },
    "date": {
      "type": "string"
    },
    "font": {
      "type": "string",
      "enum": [
        "serif",
        "sans",
        "handwriting",
        "typewriter"
      ]
    },
    "letterhead": {
      "type": "string",
      "enum": [
        "none",
        "name",
        "full"
      ]
    },
    "mail_class": {
      "type": "string",
      "enum": [
        "first_class",
        "certified",
        "certified_return_receipt"
      ],
      "description": "Non-US recipients always go First-Class International; no need to set it."
    },
    "color": {
      "type": "boolean"
    },
    "double_sided": {
      "type": "boolean"
    },
    "mail_date": {
      "type": "string",
      "format": "date"
    },
    "must_arrive_by": {
      "type": "string",
      "format": "date"
    },
    "pdf_placement": {
      "type": "string",
      "enum": [
        "auto",
        "first_page",
        "cover_page"
      ]
    },
    "label": {
      "type": "string"
    }
  }
}