Mail Templates โ
HTML email templates used by the platform for transactional and workflow emails (share invitations, password recovery, factory notifications, etc.). Each template has a name, subject pattern, and body markup; the runtime renders templates with context variables at send time.
Scopes โ
| Scope | Reach |
|---|---|
mail_templates:read | Listing, reading, viewing filters. |
mail_templates:write | Creating, updating, deleting templates. |
Endpoints โ
List Mail Templates โ
GET /api/mailtemplates/
Returns a page of mail templates.
Required scope: mail_templates:read ยท also accepts API key
Query parameters โ standard pagination set; see Conventions โบ Pagination. Defaults: sort_by=created, sort_order=desc, hydrate=true.
Response 200 โ MailTemplateInDbCursorPage
Get Mail Template Filter Metadata โ
GET /api/mailtemplates/filters
Returns filter/operator/sort options for List Mail Templates.
Required scope: mail_templates:read
Response 200 โ open metadata object.
Get Mail Template by ID โ
GET /api/mailtemplates/{id}
Returns a single mail template.
Required scope: mail_templates:read ยท also accepts API key
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Template ID. |
Response 200 โ MailTemplateRead
Create Mail Template โ
POST /api/mailtemplates/
Creates a new mail template.
Required scope: mail_templates:write
Request body โ MailTemplateWriteCreate
Response 201 โ MailTemplateRead
Update Mail Template by ID โ
PUT /api/mailtemplates/{id}
Replaces a mail template.
Required scope: mail_templates:write
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Template ID. |
Request body โ MailTemplateWriteReplace
Response 200 โ MailTemplateRead
Patch Mail Template โ
PATCH /api/mailtemplates/{id}
Partial mail template update.
Required scope: mail_templates:write
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Template ID. |
Request body โ MailTemplateWriteUpdate
Response 200 โ MailTemplateRead
Delete Mail Template by ID โ
DELETE /api/mailtemplates/{id}
Removes a mail template. Workflow steps and share-email actions that reference a deleted template will fail at send time โ verify nothing depends on the template before deleting.
Required scope: mail_templates:write
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Template ID. |
Response 204 โ empty.
See also โ
- Asset Store โบ Shares โบ Send Share Email โ a common consumer of mail templates.
- Factory โบ Builder Helpers โ a read-only view of these templates used by the workflow editor.
- Themes โ visual branding (separate from email templates).
