---
title: "Create email template"
method: POST
path: "/projects/{id}/email-templates"
tags: ["Auth Configuration"]
---

# Create email template

`POST /projects/{id}/email-templates`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/email-templates`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

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

## Path parameters

- `id` string, uuid, required

## Request body

- CreateEmailTemplateRequest
  - `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)

## Response `201`

Template created

- EmailTemplate: 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

## Other responses

- `400`: Invalid template type or subject containing a literal interior carriage return or newline
- `403`: Custom email templates require the SUPERAGENT plan
- `409`: The project already has a template of this type

## Changes

- **2026-10-07** `23e7875e7c4c`: 1 info
  - the endpoint scheme security `ProjectAccessToken` was added to the API
- **2026-09-19** `3a6f365f3f35`: 10 breaking, 14 info
  - added the new path request parameter `id`
  - added the new required request property `html_body`
  - added the new required request property `subject`
  - added the new required request property `template_type`
  - …20 more
- **2026-08-27** `bb44e98aba2e`: 10 breaking, 11 warning, 1 info
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `201`
  - the response's body type changed from `object` to no type for status `400`
  - the response's body type changed from `object` to no type for status `403`
  - …18 more
- **2026-07-27** `bb52784e098a`: 2 info
  - added the optional property `code` to the response with the `400` status
  - added the optional property `code` to the response with the `403` status

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/email-templates/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
