Create a Template
Create a new email template.
Create a new email template. Templates can be created from HTML content, a URL, or a base64-encoded zip file.
Scope: templates.write
Request Body
namestringrequiredTemplate name (1–128 characters).
typestringrequiredTemplate type: editor, html, url, or zip.
htmlstringoptionalHTML content for the template. Provide when type is html.
urlstringoptionalURL to fetch the template from. Provide when type is url.
zip_base64stringoptionalBase64-encoded zip file containing the template. Provide when type is zip.
Sample Requests
You can create a template from HTML content, a URL, or a base64-encoded zip file.
POST https://api.maileroo.com/v1/templates
Content-Type: application/json
{
"name": "Welcome email",
"type": "html",
"html": "<h1>Hello {{name}}</h1>"
}Sample Response
Returns 201 Created with the created template object.