Auth Configuration

Create email template

Changed on

Creates a custom email template for the project. Custom email templates are a SUPERAGENT feature: requests from a HOBBY project owner are rejected with 403, and HOBBY projects always send the built-in default templates regardless of any previously saved custom rows. Every project is created with one template per type, so customizing one is usually a PUT; creating a type the project already has returns 409. Valid template types: welcome, confirmation, password_reset, password_changed

post/projects/{id}/email-templates

Request

  • Base URL
    https://api.volcano.dev
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

id, string uuid required

Project ID

Request body

CreateEmailTemplateRequest required
template_type, 'welcome' | 'confirmation' | 'password_reset' | 'password_changed' required

Type of email template

subject, string required

Subject template. After Go template whitespace trimming, literal interior carriage returns or newlines return 400. Outer whitespace and trailing block-scalar newlines are allowed.

html_body, string required

HTML template body. Available placeholders:

  • {{.Token}} - The confirmation/reset token
  • {{.ProjectName}} - The project name
  • {{.Email}} - User's email address
text_body, string required

Plain text template body (same placeholders as HTML)

Example request

{
  "subject": "Confirm your email"
}

Response

Template created

EmailTemplate required

Custom email template

id, string uuid
project_id, string uuid
template_type, 'welcome' | 'confirmation' | 'password_reset' | 'password_changed' required
subject, string required
html_body, string required

HTML template with placeholders

text_body, string required

Plain text template with placeholders

created_at, string date-time
updated_at, string date-time

Example response

{
  "subject": "Confirm your email address"
}

Changes

    • info

      the endpoint scheme security ProjectAccessToken was added to the API

    • breaking

      added the new path request parameter id

    • breaking

      added the new required request property html_body

    22 more changes in this revision