> ## Documentation Index
> Fetch the complete documentation index at: https://docs.insforge.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Update email template

> Update a specific email template by type (admin only)



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/auth.yaml put /api/auth/email-templates/{type}
openapi: 3.0.3
info:
  title: Insforge Authentication API
  version: 2.0.0
  description: Authentication endpoints with separated auth and profile tables
servers: []
security: []
paths:
  /api/auth/email-templates/{type}:
    put:
      tags:
        - Admin
      summary: Update email template
      description: Update a specific email template by type (admin only)
      parameters:
        - name: type
          in: path
          required: true
          schema:
            type: string
            enum:
              - email-verification-code
              - email-verification-link
              - reset-password-code
              - reset-password-link
          description: Template type to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - subject
                - bodyHtml
              properties:
                subject:
                  type: string
                  description: Email subject line
                bodyHtml:
                  type: string
                  description: HTML body of the email template
      responses:
        '200':
          description: Template updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplate'
        '400':
          description: Invalid template type or request body
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - Admin only
      security:
        - bearerAuth: []
components:
  schemas:
    EmailTemplate:
      type: object
      properties:
        id:
          type: string
          format: uuid
        templateType:
          type: string
          enum:
            - email-verification-code
            - email-verification-link
            - reset-password-code
            - reset-password-link
        subject:
          type: string
        bodyHtml:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````