Emails
Send transactional emails using Handlebars templates with layouts, partials, and per-environment configuration. Each environment (production, staging, development) uses its own provider config and sender identity.
/api/v1/emails/sendSend a transactional email using a registered template. Supports idempotency keys to prevent duplicate sends.
const result = await helmdesk.emails.send({
templateKey: 'welcome',
to: { email: 'user@example.com', name: 'Jane' },
variables: { activationUrl: 'https://...' },
environment: 'production',
}, { idempotencyKey: 'signup-jane-2024' })/api/v1/emails/previewPreview a rendered email template without sending. Uses sample data if no variables are provided.
const { subject, html } = await helmdesk.emails.preview({
templateKey: 'welcome',
variables: { name: 'Test User' },
})/api/v1/email-templates/:key/schemaGet the template variable schema (auto-detected from Handlebars expressions).
const schema = await helmdesk.emails.getTemplateSchema('welcome')
// schema.variables -> [{ name: 'activationUrl', required: true }]Environments
Each project can configure separate email providers for production, staging, and development. Sending modes include live, sandbox (redirects to a test address), allowlist (only certain domains), and paused.
See Email Templates for the template import API and shared template system.