Skip to navigation

Add a new template

Creates a new email template with the specified content and settings.

Request

This endpoint expects an object.
keystringRequired
A valid Mandrill API key
namestringRequired

Name for the new template - must be unique

from_emailstring or nullOptionalformat: "email"
Default sending address for emails sent using this template
from_namestring or nullOptional
Default from name to be used
subjectstring or nullOptional
Default subject line to be used
codestring or nullOptional

HTML code for the template with mc:edit attributes for editable elements

textstring or nullOptional
Default text part to be used when sending with this template
publishbooleanOptionalDefaults to true
Set to false to add a draft template without publishing
labelslist of stringsOptional
Optional array of up to 10 labels to use for filtering templates

Response

Success

Errors

401
Unauthorized Error
422
Unprocessable Entity Error
500
Internal Server Error