Skip to main content
POST
/
templates
Create template
curl --request POST \
  --url https://api.mailrify.com/templates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "subject": "<string>",
  "body": "<string>",
  "type": "TRANSACTIONAL"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "subject": "<string>",
  "body": "<string>",
  "type": "TRANSACTIONAL",
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. The project is automatically derived from the key.

Body

application/json
name
string
required
subject
string
required
body
string
required
type
enum<string>
required
Available options:
TRANSACTIONAL,
MARKETING

Response

201 - application/json

Template created

id
string
name
string
subject
string
body
string
type
enum<string>
Available options:
TRANSACTIONAL,
MARKETING
createdAt
string<date-time>