a default sending address for emails sent using this template
$from_name
—
string
a default from name to be used
$subject
—
string
a default subject line to be used
$code
—
string
the HTML code for the template with mc:edit attributes for the editable elements
$text
—
string
a default text part to be used when sending with this template
$publish
—
boolean
set to false to add a draft template without publishing
$labels
—
array
an optional array of up to 10 labels to use for filtering templates - labels[] string a single label
Returns
struct
the information saved about the new template - slug string the immutable unique code name of the template
- name string the name of the template
- labels array the list of labels applied to the template
- labels[] string a single label
- code string the full HTML code of the template, with mc:edit attributes marking the editable elements - draft version
- subject string the subject line of the template, if provided - draft version
- from_email string the default sender address for the template, if provided - draft version
- from_name string the default sender from name for the template, if provided - draft version
- text string the default text part of messages sent with the template, if provided - draft version
- publish_name string the same as the template name - kept as a separate field for backwards compatibility
- publish_code string the full HTML code of the template, with mc:edit attributes marking the editable elements that are available as published, if it has been published
- publish_subject string the subject line of the template, if provided
- publish_from_email string the default sender address for the template, if provided
- publish_from_name string the default sender from name for the template, if provided
- publish_text string the default text part of messages sent with the template, if provided
- published_at string the date and time the template was last published as a UTC string in YYYY-MM-DD HH:MM:SS format, or null if it has not been published
- created_at string the date and time the template was first created as a UTC string in YYYY-MM-DD HH:MM:SS format
- updated_at string the date and time the template was last modified as a UTC string in YYYY-MM-DD HH:MM:SS format