v1

latestOpenAPI 3.0.22026-07-12103244.1 KB
Email templates

saveTemplate

Create or update a template. If id is provided, it will update the template.

post/v1/email-template/templates

Request body

_idstring
_tagsstring[]

Entity tags

_manifeststring[]

Manifest ID used to create/update the entity

_purposestring[]

Entity Purposes

namestring required

name

brand_idnumber nullable

Brand ID. Equal 0 if available for All brands

subjectstring required

Subject

bodystring

Body

system_templateboolean

If template is created by system (Double Opt-in, CMD invitation,...) then true, and some attributes can not be edited such as Name, To,... Remember to add default content of template to system-template.ts enum for revert to original feature

created_bystring

Created by

updated_bystring

Updated by

json_templatestring

This field is used to store JSON templates. If this field is populated, then the Body html is derived from the JSON.

original_template_idstring nullable

Set on a duplicated template to point at its source template id. Cleared (set to null) after automations referencing the source have been migrated onto the new template via migrateAutomationsForTemplate.

converted_to_new_editorboolean

True after the template has been converted from legacy HTML to the new email-builder format. Used by the UI to expose the "Revert to legacy HTML" action.

Example request

{
  "_id": "cd7809ba-a111-4dd9-8d15-18eb4de0faed",
  "_tags": [
    "template"
  ],
  "_manifest": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "_purpose": [
    "a0ec23ac-12f8-4d89-9a63-91cba3787f2a",
    "310cd388-2f15-4b5b-8f98-ca14c1e03304"
  ],
  "name": "Order confirmation",
  "from": {
    "name": "epilot",
    "email": "no-reply@epilot.cloud"
  },
  "to": [
    {
      "name": "Ny Huynh",
      "email": "ny.huynh@axonactive.com"
    }
  ],
  "cc": [
    {
      "name": "Ny Huynh",
      "email": "ny.huynh@axonactive.com"
    }
  ],
  "bcc": [
    {
      "name": "Ny Huynh",
      "email": "ny.huynh@axonactive.com"
    }
  ],
  "subject": "We have received your order!",
  "body": "Hi Ms Ny Huynh, </br> Thank you for your order. We will contact you shortly",
  "attachments": [
    {
      "cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
      "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
      "size": 451349,
      "content_type": "application/pdf",
      "url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
      "bucket": "893487340562-message-attachment",
      "object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
      "type": "Document template"
    }
  ],
  "original_template_id": "cd7809ba-a111-4dd9-8d15-18eb4de0faed",
  "backup": {
    "backed_up_at": "2026-05-13T10:00:00.000Z"
  }
}

Response

Success

_idstring required

Entity ID

_titlestring required

Entity title

_orgstring required

Ivy Organization ID the entity belongs to

_schemastring required

URL-friendly identifier for the entity schema

_tagsstring[]

Entity tags

_created_atstring date-time required

Created date

_updated_atstring date-time required

Updated date

_purposestring[]

Entity Purposes

_manifeststring[]

Manifest ID used to create/update the entity

namestring required

name

brand_idnumber nullable

Brand ID. Equal 0 if available for All brands

subjectstring

Subject

bodystring

Body

created_bystring

Created by

updated_bystring

Updated by

json_templatestring

This field is used to store JSON templates. If this field is populated, then the Body html is derived from the JSON.

converted_to_new_editorboolean

True after the template has been converted from legacy HTML to the new email-builder format. Used by the UI to expose the "Revert to legacy HTML" action.

system_templateboolean

If template is created by system (Double Opt-in, CMD invitation,...) then true, and some attributes can not be edited such as Name, To,... Remember to add default content of template to system_template enum for revert to original feature

original_template_idstring nullable

Set on a duplicated template to point at its source template id. Cleared after automations have been migrated via migrateAutomationsForTemplate.

Example response

{
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "_org": "206801",
  "_schema": "message",
  "_tags": [
    "automatic email template"
  ],
  "_created_at": "2021-02-09T12:41:43.662Z",
  "_updated_at": "2021-02-10T09:14:31.990Z",
  "_purpose": [
    "a0ec23ac-12f8-4d89-9a63-91cba3787f2a",
    "310cd388-2f15-4b5b-8f98-ca14c1e03304"
  ],
  "_manifest": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "name": "Order confirmation",
  "from": {
    "name": "epilot",
    "email": "no-reply@epilot.cloud"
  },
  "to": [
    {
      "name": "Ny Huynh",
      "email": "ny.huynh@axonactive.com"
    }
  ],
  "cc": [
    {
      "name": "Ny Huynh",
      "email": "ny.huynh@axonactive.com"
    }
  ],
  "bcc": [
    {
      "name": "Ny Huynh",
      "email": "ny.huynh@axonactive.com"
    }
  ],
  "subject": "We have received your order!",
  "body": "Hi Ms Ny Huynh, </br> Thank you for your order. We will contact you shortly",
  "attachments": [
    {
      "cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
      "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
      "size": 451349,
      "content_type": "application/pdf",
      "url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
      "bucket": "893487340562-message-attachment",
      "object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
      "type": "Document template"
    }
  ],
  "backup": {
    "backed_up_at": "2026-05-13T10:00:00.000Z"
  },
  "original_template_id": "cd7809ba-a111-4dd9-8d15-18eb4de0faed"
}