v1

latestSwagger 2.0MIT2026-07-17233380637.0 KB
Transactional emails

Create an email template

post/smtp/templates

Request body

tagstring

Tag of the template

templateNamestring required

Name of the template

htmlContentstring

Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty

htmlUrlstring url

Url which contents the body of the email message. REQUIRED if htmlContent is empty

subjectstring required

Subject of the template

replyTostring email

Email on which campaign recipients will be able to reply to

toFieldstring

To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization

attachmentUrlstring url

Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps

isActiveboolean

Status of template. isActive = true means template is active and isActive = false means template is inactive

Example request

{
  "tag": "OrderConfirmation",
  "sender": {
    "name": "Mary from MyShop",
    "email": "contact@myshop.com",
    "id": 3
  },
  "templateName": "Order Confirmation - EN",
  "htmlContent": "The order n°xxxxx has been confirmed. Thanks for your purchase",
  "htmlUrl": "https://html.domain.com",
  "subject": "Thanks for your purchase !",
  "replyTo": "support@myshop.com",
  "toField": "{FNAME} {LNAME}",
  "attachmentUrl": "https://attachment.domain.com",
  "isActive": true
}

Response

transactional email template created

idinteger required

ID of the object created

Example response

{
  "id": 122
}