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

# Update Email Template



## OpenAPI

````yaml put /email/templates/{template_id}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /email/templates/{template_id}:
    put:
      tags:
        - Email
      summary: Update Email Template
      operationId: update_email_template_email_templates__template_id__put
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: template_id
          in: path
          required: true
          schema:
            type: string
            title: Template Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailTemplateUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailTemplateDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EmailTemplateUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Name
        subject:
          anyOf:
            - type: string
            - type: 'null'
          title: Subject
        body:
          anyOf:
            - type: string
            - type: 'null'
          title: Body
        bodyFormat:
          anyOf:
            - $ref: '#/components/schemas/EmailTemplateBodyFormat'
            - type: 'null'
      type: object
      title: EmailTemplateUpdate
    EmailTemplateDetail:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        subject:
          type: string
          title: Subject
        createdByProviderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdbyproviderid
        createdByProviderName:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdbyprovidername
        createdDate:
          type: string
          format: date-time
          title: Createddate
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
        body:
          type: string
          title: Body
        bodyFormat:
          $ref: '#/components/schemas/EmailTemplateBodyFormat'
      type: object
      required:
        - id
        - name
        - subject
        - createdDate
        - body
        - bodyFormat
      title: EmailTemplateDetail
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EmailTemplateBodyFormat:
      type: string
      enum:
        - TIPTAP_JSON
        - HTML
      title: EmailTemplateBodyFormat
      description: >-
        How an email template's ``body`` is encoded.


        TIPTAP_JSON is what the composer authors and is what every email surface
        can

        load natively. HTML is for markup pasted in from elsewhere — it is
        parsed

        into the editor on load, so it round-trips as content rather than
        markup.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````