Create a template

Create a reusable template. At least one of html or text is required. Templates carry no subject — the subject comes from the send request.

POSThttps://api.mailfully.com/v1/templates

Create a reusable template. At least one of html or text is required. Templates carry no subject — the subject comes from the send request. Placeholders use {{name}} (flat keys only); only the required list in variables_schema is enforced, and only at send time. Requires the send scope.

Loading code example
Loading code example

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

namestringrequired
Length: >= 1
htmlstring
textstring
variables_schemaobject

Opaque JSON schema-ish object; only its `required` list is enforced, at send time.

Response

application/json

The template was created.

object"template"required
Allowed values: "template"
idstringrequired
namestringrequired
htmlstringrequired
textstringrequired
variables_schemaobjectrequired

Opaque JSON schema-ish object; only its `required` list is enforced, at send time.

created_atstring<date-time>required
updated_atstring<date-time>required