Skip to main content
POST
/
email
/
templates
Create a new template
curl --request POST \
  --url http://localhost/public/v1/email/templates \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "content": "<string>",
  "content_type": "html",
  "subject": "<string>"
}
'
{
  "ok": true,
  "template": {
    "id": "<string>",
    "team_id": "<string>",
    "name": "<string>",
    "subject": "<string>",
    "content_type": "<string>",
    "scope": "<string>",
    "status": "<string>",
    "meta": {
      "json_schema": "<string>",
      "tags": [
        "<string>"
      ]
    },
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "content": "<string>",
    "alt_content": "<string>"
  }
}

Body

application/json
name
string
required

Required. Name of the template.

content
string
required

Required. HTML content of the template.

content_type
enum<string>
required

Required. Content type of the template (must be "html").

Available options:
html
subject
string | null

Optional. Subject line for emails using this template.

Response

ok
boolean
required
template
EmailTemplateResource · object
required