Platform

Email Templates

Customize the transactional emails OrbitNest sends — OTP verification, password reset, and welcome messages — with HTML templates, variable interpolation, and per-project brand colors.

OrbitNest sends transactional emails for authentication flows — OTP codes, password resets, and welcome messages. The Email Templates module lets you fully customize these emails with your brand's look and feel.

Template types

Three built-in template types cover the core authentication emails:

  • otp_verification — sent when a user requests an OTP code (sign-up or sign-in).
  • password_reset — sent when a user triggers the password recovery flow.
  • welcome — sent after a user successfully verifies their email.

Each template supports both an HTML body and a plain-text fallback. If you don't customize a template, OrbitNest uses a clean default design that works out of the box.

Template variables

Use double-brace syntax to interpolate dynamic values into your templates. Available variables depend on the template type:

html
<!-- Example: OTP verification template -->
<h1>Welcome to {{app_name}}</h1>
<p>Hi {{user_name}},</p>
<p>Your verification code is:</p>
<div style="font-size: 32px; font-weight: bold; letter-spacing: 4px;">
  {{otp}}
</div>
<p>This code expires in 10 minutes.</p>

Available variables

  • {{otp}} — the one-time password code (OTP and password reset templates).
  • {{app_name}} — the project's display name.
  • {{user_email}} — the recipient's email address.
  • {{user_name}} — the user's display name (if available, otherwise falls back to email).

Brand settings

Set a per-project brand color (hex format) that is applied to buttons, links, and accent elements across all templates. Configure via the Studio dashboard or REST API:

bash
# Set brand color for email templates
curl -X PUT \
  https://studio.orbitnest.io/api/admin/projects/{projectId}/email-templates/settings \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "brand_color": "#6366f1" }'

Managing templates

Templates are managed per project. The Studio dashboard provides a visual editor, but you can also use the REST API for programmatic control.

Get a template

bash
curl https://studio.orbitnest.io/api/admin/projects/{projectId}/email-templates/otp_verification \
  -H "Authorization: Bearer $TOKEN"

Update a template

bash
curl -X PUT \
  https://studio.orbitnest.io/api/admin/projects/{projectId}/email-templates/otp_verification \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "Your {{app_name}} verification code",
    "html_body": "<h1>Your code: {{otp}}</h1>",
    "text_body": "Your code: {{otp}}"
  }'

Delete a template (revert to default)

bash
curl -X DELETE \
  https://studio.orbitnest.io/api/admin/projects/{projectId}/email-templates/otp_verification \
  -H "Authorization: Bearer $TOKEN"

Preview & test

Send a test email to any address before going live. The preview endpoint renders the template with sample data and delivers it via your project's SMTP configuration:

bash
curl -X POST \
  https://studio.orbitnest.io/api/admin/projects/{projectId}/email-templates/otp_verification/preview \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "to": "test@example.com" }'

SMTP configuration

Email templates use your project's SMTP settings. Configure a custom SMTP server (e.g. Postmark, SendGrid, Amazon SES, or your own SMTP relay) from the Project Settings page or via the REST API. Credentials are encrypted at rest.

Custom SMTP

If no custom SMTP is configured, OrbitNest uses a shared system sender. For production apps, configure your own SMTP to control deliverability, sender address, and domain reputation. See Authentication for how emails integrate with auth flows.