Email & SMS templates allow you to customize the theming and wording of emails & SMS messages that are sent by your instance.
Returns a list of all templates. The templates are returned sorted by position.
Success
Request was not successful
Authentication invalid
Invalid request parameters
[- {
- "id": "string",
- "object": "template",
- "instance_id": "string",
- "resource_type": "string",
- "template_type": "string",
- "name": "string",
- "slug": "string",
- "position": 0,
- "can_revert": true,
- "can_delete": true,
- "subject": "string",
- "markup": "string",
- "body": "string",
- "available_variables": [
- "string"
], - "required_variables": [
- "string"
], - "from_email_name": "string",
- "delivered_by_clerk": true,
- "updated_at": 0,
- "created_at": 0
}
]
Returns the details of a template
Success
Request was not successful
Authentication invalid
Resource not found
{- "id": "string",
- "object": "template",
- "instance_id": "string",
- "resource_type": "string",
- "template_type": "string",
- "name": "string",
- "slug": "string",
- "position": 0,
- "can_revert": true,
- "can_delete": true,
- "subject": "string",
- "markup": "string",
- "body": "string",
- "available_variables": [
- "string"
], - "required_variables": [
- "string"
], - "from_email_name": "string",
- "delivered_by_clerk": true,
- "updated_at": 0,
- "created_at": 0
}
Updates the existing template of the given type and slug
name | string The user-friendly name of the template |
subject | string or null The email subject. Applicable only to email templates. |
markup | string or null The editor markup used to generate the body of the template |
body | string The template body before variable interpolation |
delivered_by_clerk | boolean or null Whether Clerk should deliver emails or SMS messages based on the current template |
from_email_name | string The local part of the From email address that will be used for emails. For example, in the address 'hello@example.com', the local part is 'hello'. Applicable only to email templates. |
Success
Request was not successful
Authentication invalid
Payment required
Resource not found
Invalid request parameters
{- "name": "string",
- "subject": "string",
- "markup": "string",
- "body": "string",
- "delivered_by_clerk": true,
- "from_email_name": "string"
}
{- "id": "string",
- "object": "template",
- "instance_id": "string",
- "resource_type": "string",
- "template_type": "string",
- "name": "string",
- "slug": "string",
- "position": 0,
- "can_revert": true,
- "can_delete": true,
- "subject": "string",
- "markup": "string",
- "body": "string",
- "available_variables": [
- "string"
], - "required_variables": [
- "string"
], - "from_email_name": "string",
- "delivered_by_clerk": true,
- "updated_at": 0,
- "created_at": 0
}
Reverts an updated template to its default state
Success
Request was not successful
Authentication invalid
Payment required
Resource not found
{- "id": "string",
- "object": "template",
- "instance_id": "string",
- "resource_type": "string",
- "template_type": "string",
- "name": "string",
- "slug": "string",
- "position": 0,
- "can_revert": true,
- "can_delete": true,
- "subject": "string",
- "markup": "string",
- "body": "string",
- "available_variables": [
- "string"
], - "required_variables": [
- "string"
], - "from_email_name": "string",
- "delivered_by_clerk": true,
- "updated_at": 0,
- "created_at": 0
}
Returns a preview of a template for a given template_type, slug and body
Required parameters
subject | string or null The email subject. Applicable only to email templates. |
body | string The template body before variable interpolation |
from_email_name | string The local part of the From email address that will be used for emails. For example, in the address 'hello@example.com', the local part is 'hello'. Applicable only to email templates. |
OK
Request was not successful
Authentication invalid
Resource not found
Invalid request parameters
{- "subject": "string",
- "body": "string",
- "from_email_name": "string"
}
{ }