post--v3-domain_name-templates
Create email templates for Mailgun domains to standardize message formatting, headers, and content for consistent email delivery.
Instructions
Create a template
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain_name | Yes | ||
| name | Yes | Name of the template being stored. Supports utf-8 characters and name will be down cased. | |
| description | No | Description of the template being stored | |
| createdBy | No | Optional metadata field api user can indicate who created the template. | |
| template | No | Content of the template. | |
| tag | No | Initial tag of the created version. If the template parameter is provided and the tag is missing, the default value `initial` is used. | |
| comment | No | Version comment. This is valid only if a new version is being created. (template parameter is provided.) | |
| headers | No | Key value JSON object of headers to be stored with the template. Where key is the header name and value is the header value. The header names `From`, `Subject`, and `Reply-To` are the only ones currently supported. These headers will be inserted into the MIME at the time we attempt delivery. Headers set at the message level will override headers set on the template. e.g. Setting the From header at the time of sending will override the From header saved on the template. Additionally, headers generated by templates are not reflected on the accepted event as they are not prepended to the message until the message is prepped for delivery. if a From header is not provided either in the message or template, we will default to `postmaster@your-sending-domain.tld` |