Manage email settings and notifications.
Send a test email
Queues an email for delivery using the mail server details in the request, and returns the request. The console uses it to test mail server settings. The call fails if no email service is registered.
Send an email from a template
Builds an email from an email template for one user and queues it for delivery. Each key in the request body is a text placeholder in the template that is replaced with its value. The call fails if the user has no email address or the template is empty.
Get the email settings
Returns the email settings record, which holds the mail server configuration the product uses to send email. The response is a single object, not an array.
Create the email settings
Creates the email settings record if it does not exist yet. The record is created with default values and the values in the request body are not applied, so call the update route afterward to set the mail server details.
Delete the email settings
Deletes the email settings record with the given ID and returns the record that was deleted.
Get email settings by ID
Returns the email settings record with the given ID.
Update the email settings
Replaces the email settings with the values in the request body and returns them. Use it to set the mail server, sender address and credential. The path ID must belong to an existing record; the record that is saved is the one named by the id in the body.
List email templates
Returns all email templates. Use it to find the ID of a template to use when sending email or when setting up notifications.
Create an email template
Creates an email template and returns the new template.
Delete an email template
Deletes the email template with the given ID and returns the template that was deleted.
Get an email template
Returns the email template with the given ID.
Update an email template
Updates the email template and returns the saved template. The template to update is identified by the id in the request body, so keep it the same as the ID in the path.
Delete a queued email
Deletes the email with the given ID from the email queue and returns the email that was deleted.
Get an email
Returns the email with the given ID, including its recipients, subject and body.