Skip to main content
POST
Create a template

Authorizations

Authorization
string
header
required

All requests must include Authorization: Bearer <api_key>. Keys are prefixed pw_live_ or pw_test_. See Authentication.

Body

application/json
name
string
required
Example:

"Invoice receipt"

channel
enum<string>
required

Delivery channel for a message

Available options:
email,
sms,
push
subject
string

Default subject for email templates. Supports {{ variable }} syntax.

body
string

Template body. Supports {{ variable }} syntax.

Response

The created template

id
string
Example:

"tmpl_8f3e2a"

object
enum<string>
Available options:
template
name
string
channel
enum<string>

Delivery channel for a message

Available options:
email,
sms,
push
subject
string | null
body
string
version
integer

Incremented every time the body changes

created_at
string<date-time>
updated_at
string<date-time>