Skip to main content
POST
Preview an email template

Authorizations

Api-Token
string
header
required

Server-to-server authentication. Generate a token in the admin UI at Settings → Developers → API Access. Send the raw token in the Api-Token header — there is no Bearer prefix.

Tokens can be marked read-only at creation time, in which case the API rejects any non-GET request with 403 Forbidden.

Body

application/json

The new EmailTemplate resource

EmailTemplate Entity

IMPORTANT: Template Customization Status

CUSTOMIZABLE TEMPLATES (via UnifiedEmailService):

  • All constants defined below can be customized through the email template interface

NON-CUSTOMIZABLE TEMPLATES (System-Managed): The following email types are NOT customizable and are handled directly by the system:

  1. VOTING & ELECTIONS:

    • vote_published (InstantEmailNotificationMessageHandler) - Language-specific templates
    • voting_confirm_seal (VoteBoxCreateListener) - Direct TemplatedEmail
  2. NEWSLETTERS:

    • Newsletter content (NewsletterMessageHandler) - Content from Newsletter entity
    • newsletter_registration_[lang] (NewsletterRegistrationController) - Language-specific
  3. INSTANT NOTIFICATIONS:

    • Discussion updates (InstantEmailNotificationMessageHandler)
    • Comment notifications (InstantEmailNotificationMessageHandler)
    • Event updates (InstantEmailNotificationMessageHandler)
  4. OTHER SYSTEM EMAILS:

    • contract_signed_* (Language-specific templates)
    • ticket_paid (Language-specific templates)
    • upcoming_event_reminder (Language-specific templates)
    • fee_renewal_reminder (Language-specific templates)
    • subscription_identity_reminder_* (Language-specific templates)

NOTE FOR DEVELOPERS:

  • If an email type is NOT listed as a constant below, it cannot be customized
  • Language-specific templates (*_en, *_ro) are being phased out in favor of unified templates
  • To make a template customizable, add a TYPE constant and integrate with UnifiedEmailService
tenant
string<iri-reference>
Example:

"/api/v1/tenants/1"

type
string
subject
string | null
html
string | null

Response

EmailTemplate resource created

EmailTemplate Entity

IMPORTANT: Template Customization Status

CUSTOMIZABLE TEMPLATES (via UnifiedEmailService):

  • All constants defined below can be customized through the email template interface

NON-CUSTOMIZABLE TEMPLATES (System-Managed): The following email types are NOT customizable and are handled directly by the system:

  1. VOTING & ELECTIONS:

    • vote_published (InstantEmailNotificationMessageHandler) - Language-specific templates
    • voting_confirm_seal (VoteBoxCreateListener) - Direct TemplatedEmail
  2. NEWSLETTERS:

    • Newsletter content (NewsletterMessageHandler) - Content from Newsletter entity
    • newsletter_registration_[lang] (NewsletterRegistrationController) - Language-specific
  3. INSTANT NOTIFICATIONS:

    • Discussion updates (InstantEmailNotificationMessageHandler)
    • Comment notifications (InstantEmailNotificationMessageHandler)
    • Event updates (InstantEmailNotificationMessageHandler)
  4. OTHER SYSTEM EMAILS:

    • contract_signed_* (Language-specific templates)
    • ticket_paid (Language-specific templates)
    • upcoming_event_reminder (Language-specific templates)
    • fee_renewal_reminder (Language-specific templates)
    • subscription_identity_reminder_* (Language-specific templates)

NOTE FOR DEVELOPERS:

  • If an email type is NOT listed as a constant below, it cannot be customized
  • Language-specific templates (*_en, *_ro) are being phased out in favor of unified templates
  • To make a template customizable, add a TYPE constant and integrate with UnifiedEmailService
id
integer
read-only
type
string
subject
string | null
html
string | null