Skip to main content
POST
Create a template

Authorizations

Authorization
string
header
required

Your API key, ps_live_… or ps_test_….

Body

application/json
name
string
required

Shown in the dashboard only.

Example:

"Sign-in code"

slug
string

What your code sends in template. Lowercase letters, digits and hyphens.

Example:

"otp-login"

starter
string

A ready-made design to start from.

Example:

"otp"

subject
string

Mustache, like the HTML.

Example:

"Your {{brand.name}} code: {{code}}"

from
string

Default sender, used when an email gives none.

Example:

"Acme <security@acme.com>"

html
string

Mustache template, up to 512 KB.

text
string

Plain-text version. Generated from the HTML when omitted.

Response

201 - application/json

TemplateResource

object
string
required
Allowed value: "template"
id
string
required
name
string
required
slug
string
required
aliases
object
required
subject
string
required

Le brouillon : ce que publish publiera.

from
string | null
required
html
string
required
text
string | null
required
variables
object[]
required
published_version
integer | null
required
has_unpublished_changes
string
required
created_at
string
required
updated_at
string
required