{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/paubox/main/json-schema/paubox-templated-message-request-schema.json", "title": "TemplatedMessageRequest", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/paubox-dynamic-templates-api-openapi.yml#/components/schemas/TemplatedMessageRequest", "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/$defs/TemplatedMessageRequest_data" } }, "$defs": { "Attachment": { "required": [ "content", "contentType", "fileName" ], "type": "object", "properties": { "fileName": { "type": "string" }, "contentType": { "type": "string", "description": "Valid MIME type, e.g., application/pdf." }, "content": { "type": "string", "description": "Base64-encoded file contents." } } }, "TemplatedMessage": { "required": [ "headers", "recipients" ], "type": "object", "properties": { "recipients": { "minItems": 1, "type": "array", "items": { "type": "string", "description": "Email address, optionally with display name (e.g., \"J. Smith \")." } }, "bcc": { "type": "array", "items": { "type": "string" } }, "cc": { "type": "array", "items": { "type": "string" } }, "headers": { "$ref": "#/$defs/TemplatedMessageHeaders" }, "allowNonTLS": { "type": "boolean", "description": "Allow delivery over non-TLS rather than converting to a Secure Portal message. Not HIPAA compliant if the message contains PHI.\n", "default": false }, "forceSecureNotification": { "type": "boolean", "description": "Force delivery as a Paubox Secure Message; recipient gets a pickup notification with a link.\n", "default": false }, "attachments": { "type": "array", "items": { "$ref": "#/$defs/Attachment" } } } }, "TemplatedMessageHeaders": { "required": [ "from", "subject" ], "type": "object", "properties": { "subject": { "type": "string", "description": "Message subject (can include template variables)" }, "from": { "type": "string", "description": "Must match the verified domain of your API key." }, "reply-to": { "type": "string", "description": "Reply-to address; must match a verified domain if different from from." }, "List-Unsubscribe": { "type": "string", "description": "Insert a List-Unsubscribe header (mailto and/or http). See RFC guidance for syntax.\n" }, "List-Unsubscribe-Post": { "type": "string", "description": "Used in conjunction with List-Unsubscribe header." }, "additionalProperties": { "type": "string", "description": "Any additional custom header values." } } }, "TemplatedMessageRequest_data": { "required": [ "message", "template_name", "template_values" ], "type": "object", "properties": { "template_name": { "type": "string", "description": "The name of the template to use (must match exactly)" }, "template_values": { "type": "string", "description": "JSON-formatted string containing template variable values" }, "message": { "$ref": "#/$defs/TemplatedMessage" } } } } }