Templates

Create template

Create a new stored template. Templates can be used when sending emails as the content of the message.

post/v1/templates/template

Request

  • Base URL: https://your-emailengine-host
  • URL: https://your-emailengine-host/v1/templates/template
  • Auth: HTTP bearer

Headers

x-ee-timeoutinteger

Request timeout in milliseconds. Raises the command timeout above the EENGINE_TIMEOUT default for a long-running request; a value below the default has no effect

Example:30000

Request body

accountstring nullable required

Account ID. Use null for public templates.

namestring required

Name of the template

descriptionstring

Optional description of the template

format'html' | 'markdown'

Markup language for HTML ("html" or "markdown")

Example request

{
  "account": "example",
  "name": "Transaction receipt",
  "description": "Something about the template",
  "content": {
    "subject": "What a wonderful message",
    "text": "Hello from myself!",
    "html": "<p>Hello from myself!</p>",
    "previewText": "Welcome to our newsletter!"
  }
}

Response

Returns the created template.

createdboolean

Was the template created or not

accountstring nullable required

Account ID. Null for public templates

idstring required

Template ID

Example response

{
  "account": "user123",
  "id": "example"
}

Changes

No recorded changes to this operation across all 1 revision of this API.