v1

latestOpenAPI 3.0.22026-07-12103244.1 KB
Email templates

convertToBuilder

Converts a legacy HTML email template into the email-builder block format. Stores the new json_template (stringified block graph), re-renders body from the resulting blocks, and stashes the original HTML at backup.body. Returns 409 if the template is already converted unless force=true.

post/v1/email-template/templates/{id}:convertToBuilder

Path parameters

idstring required

Template entity ID

Request body

dryRunboolean

When true, return the converted output without saving.

forceboolean

When true, overwrite an existing json_template.

as_copyboolean

When true, leave the source template untouched and save the converted result as a NEW template (linked via original_template_id). The response is the new entity.

namestring

Optional name for the as_copy result. The UI sends a localized copy name (e.g. "Copy of <name> (Visual)") so the new template is named like the list-view "Duplicate" action. Ignored unless as_copy is true.

Example request

{
  "name": "Copy of Welcome email (Visual)"
}

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"
}