Create email template

Creates a template as a draft. Nothing sends it until it's published.

POST
/email/templates

Creates a template as a draft. Nothing sends it until it's published.

Authorization

headerAuthorizationBearer <Relevate API key>

Relevate API key scoped to the operation's product and environment.

Request Body

application/json
  1. body

A new template's draft.

alias?|

The name to send it by, like password-reset: lowercase letters, numbers and dashes. Unique in the project.

html*string

The email's HTML, up to 500,000 characters.

message_class*string

service or marketing.

name*string

2 to 120 characters; shown in the dashboard.

preheader?|

The preview line inboxes show after the subject, up to 200 characters.

sender_identity_id?|

The sending identity it's sent from; publishing needs one.

subject*string

Up to 200 characters.

text?|

The plain-text version, up to 200,000 characters. Made from the HTML when left out.

variables?array<>|

The variables it takes from code, as reads return them.

Response Body

The new draft.

Example Request
curl -X POST 'https://api.relevate.app/email/templates' \
  -H 'Content-Type: application/json' \
  -d '{
  "html": "string",
  "message_class": "string",
  "name": "string",
  "subject": "string"
}'
Example Response
Empty