pub struct HtmlTemplateCreate {
pub domain_type: String,
pub is_global: Option<bool>,
pub name: String,
pub copy_assets_from_id: Option<Option<i64>>,
pub html: Option<Option<String>>,
pub mjml: Option<Option<String>>,
pub extra: Map<String, Value>,
}Expand description
Creates template metadata owned by the current user, with independently optional HTML and MJML source files. The API stores both sources as supplied; it does not compile MJML into HTML. Membership-document and donation-receipt purposes require isGlobal=true.
Fields§
§domain_type: StringTemplate purpose: email for group-member emails, bulkletter for mail-merged letters, groupmember-document for membership documents, and donation-receipt-letter/attachment for donation receipt output.
Allowed values: bulkletter, donation-receipt-attachment, donation-receipt-letter, email, groupmember-document.
is_global: Option<bool>Whether the template is shared for its domain. Shared availability still depends on template/domain permissions; ownership is retained even for global templates.
name: StringDisplay name of the HTML template.
copy_assets_from_id: Option<Option<i64>>Copy image asset files from this template ID after creating the new template. Does not copy HTML/MJML or rewrite embedded URLs; omit/null to copy none.
None leaves the field out, Some(None) sends null.
html: Option<Option<String>>HTML source; omitted/null stores no HTML file. The nonempty string 0 is also treated as absent by the current service.
None leaves the field out, Some(None) sends null.
mjml: Option<Option<String>>MJML editor source; omitted/null stores no MJML file. This input is not compiled or validated as MJML by this endpoint.
None leaves the field out, Some(None) sends null.
extra: Map<String, Value>Fields not described by the spec, e.g. instance-specific DB fields.