Skip to content

Email ​

Description ​

The email module provides management of email blocks, templates with i18n support, and user email verification.

Events ​

Following events are transmitted via the websocket.

Fired when a new email block is created. This event requires read access to the resource email.blocks.

NameDescription
type
stringconstant
Constant value: EMAIL_BLOCK_ADD
uuid
string
Unique identifier for the block
name
string
Human-readable name for the block
content
string
HTML content of the block
createdAt
integer
Creation timestamp
updatedAt
integeroptional
Last update timestamp

API ​

List Email Blocks ​

Returns all email building blocks (headers, footers, buttons, etc.)

GET
/api/v1/email/blocks

Access ​

This endpoint requires read permission for the resource email.blocks.

Response ​

NameDescription

Get Email Block ​

Returns a single email block by UUID

GET
/api/v1/email/blocks/:blockUuid

Access ​

This endpoint requires read permission for the resource email.blocks.

URL Parameter ​

NameDescription
blockUuid
string
Unique identifier for the block

Response ​

NameDescription
uuid
string
Unique identifier for the block
name
string
Human-readable name for the block
content
string
HTML content of the block
createdAt
integer
Creation timestamp
updatedAt
integeroptional
Last update timestamp

Delete Email Block ​

Deletes an email block

DELETE
/api/v1/email/blocks/:blockUuid

Access ​

This endpoint requires delete permission for the resource email.blocks.

URL Parameter ​

NameDescription
blockUuid
string
Unique identifier for the block

Response ​

This endpoint simply returns Status 204 to indicate a successful operation and to save bandwidth.

List Email Templates ​

Returns all email templates

GET
/api/v1/email/templates

Access ​

This endpoint requires read permission for the resource email.templates.

Response ​

NameDescription

Get Email Template ​

Returns a single email template by UUID

GET
/api/v1/email/templates/:templateUuid

Access ​

This endpoint requires read permission for the resource email.templates.

URL Parameter ​

NameDescription
templateUuid
string
Unique identifier for the template

Response ​

NameDescription
uuid
string
Unique identifier for the template
name
string
Human-readable name for the template
blocks
array
Aray of block UUIDs referenced in the template
subject
string
Email subjec template wih `text:key` and `param` placeholders
body
string
Email body HTML with `text:key`, `block:uuid`, and `param` placeholders
translations
dictionary
Translations keyed by language code, containing text key to string mappings
parameters
array
List of required parameter names like `code`, `username`
createdAt
integer
Creation timestamp
updatedAt
integeroptional
Last update timestamp

Delete Email Template ​

Deletes an email template

DELETE
/api/v1/email/templates/:templateUuid

Access ​

This endpoint requires delete permission for the resource email.templates.

URL Parameter ​

NameDescription
templateUuid
string
Unique identifier for the template

Response ​

This endpoint simply returns Status 204 to indicate a successful operation and to save bandwidth.

Render Email Template ​

Renders an email template with the specified locale and parameters. Replaces block:uuid placeholders with block content and param placeholders with provided values.

GET
/api/v1/email/render/:templateUuid

Access ​

This endpoint requires read permission for the resource email.templates.

URL Parameter ​

NameDescription
templateUuid
string
Unique identifier for the template

Query Parameter ​

NameDescription
locale
string
Locale code for the translation (e.g., en-GB, de-DE)
Pattern: ^[a-z]{2}(-[A-Z]{2})?$

Response ​

NameDescription
subject
string
Rendered subject with parameters replaced
body
string
Rendered body with blocks and parameters replaced

Get Email Status ​

Returns the current user`s email verification status

GET
/api/v1/email/user

Response ​

NameDescription
status
stringenum
Possible values: unregistered, pending_verification, verified
email
stringoptional

Register Email ​

Registers an email address for the current user and sends a verification code. Can be called again to resend the code if email is not yet verified.

POST
/api/v1/email/register

Request Body ​

NameDescription
email
string
Email address to register

Response ​

This endpoint simply returns Status 204 to indicate a successful operation and to save bandwidth.

Verify Email ​

Verifies a user`s email using the 6-digit code

POST
/api/v1/email/verify

Request Body ​

NameDescription
code
string
6-digit verification code

Response ​

NameDescription
status
stringenum
Possible values: unregistered, pending_verification, verified
verifiedAt
numberoptional

Reset Email ​

Removes the current user`s email registration, reverting their status to unregistered.

DELETE
/api/v1/email/user

Response ​

This endpoint simply returns Status 204 to indicate a successful operation and to save bandwidth.