Create template

Creates a template.

POST/templates

Body parameters

  • namestringrequired

    Unique within your team.

  • aliasstring

    Stable identifier you can send with, unique within your team. Made from the name when you leave it out: Welcome email becomes welcome-email. Renaming a template keeps its alias.

  • subjectstring

    Supports variables.

  • htmlstring

    Supports variables.

  • textstring

    Plain-text version.

  • fromstring

    Default sender.

  • reply_tostring

    Default Reply-To.

Request

curl -X POST 'https://api.mailvina.com/templates' \
  -H 'Authorization: Bearer mv_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Welcome email",
  "subject": "Welcome, {{name|friend}}!",
  "html": "<h1>Hi {{name|there}}</h1>"
}'

Response

{
  "object": "template",
  "id": "f3b9756c-f4f4-44da-bc00-9f7903c8a83f"
}