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

# Update an email template, layout or system email.

> Send only the fields to change, usually Subject and Body. Fields left out of the request
keep their current values; a field sent as null is cleared. The Uid in the request body
is ignored.
            
Subject and Body must be valid Liquid, and Body must keep every token in RequiredTokens
(for example ConfirmationUrl in the registration confirmation); otherwise the update is
rejected with a validation error. The Name, Description and SystemName of a system email
cannot be changed.
            
A template with a Design (made in the drag-and-drop editor of Email > Email templates)
opens in the editor from its Design, not its Body. To change the Body of such a
template, send Design as null as well: the editor then opens the new Body as HTML.
Otherwise the editor keeps showing the old design, and saving the template there
replaces the new Body. System emails have no Design.
            
A system email the account never edited has a Uid that starts with int_. Updating it
stores the account's own copy, with the default content for the fields left out, and
returns it with its new Uid. From then on Outseta sends the copy; the int_ Uid
returns 404.
            
On an Outseta account that is not verified yet, updating a system email pauses all email
sending of the account, as it does in the Outseta app.



## OpenAPI

````yaml /api-reference/openapi.json put /api/v1/templates/{templateUid}
openapi: 3.0.0
info:
  title: Outseta API
  description: >-
    Outseta REST API. See the [API
    overview](https://docs.outseta.com/api-reference/overview) for
    authentication, field selection, pagination, filtering, errors, rate limits
    and webhooks.
  version: v1
servers:
  - url: https://{subdomain}.outseta.com
    description: Your Outseta account
    variables:
      subdomain:
        default: your-subdomain
        description: >-
          Your Outseta account subdomain — the part before ".outseta.com" in
          your admin URL.
security: []
paths:
  /api/v1/templates/{templateUid}:
    put:
      tags:
        - Template
      summary: Update an email template, layout or system email.
      description: >-
        Send only the fields to change, usually Subject and Body. Fields left
        out of the request

        keep their current values; a field sent as null is cleared. The Uid in
        the request body

        is ignored.
                    
        Subject and Body must be valid Liquid, and Body must keep every token in
        RequiredTokens

        (for example ConfirmationUrl in the registration confirmation);
        otherwise the update is

        rejected with a validation error. The Name, Description and SystemName
        of a system email

        cannot be changed.
                    
        A template with a Design (made in the drag-and-drop editor of Email >
        Email templates)

        opens in the editor from its Design, not its Body. To change the Body of
        such a

        template, send Design as null as well: the editor then opens the new
        Body as HTML.

        Otherwise the editor keeps showing the old design, and saving the
        template there

        replaces the new Body. System emails have no Design.
                    
        A system email the account never edited has a Uid that starts with int_.
        Updating it

        stores the account's own copy, with the default content for the fields
        left out, and

        returns it with its new Uid. From then on Outseta sends the copy; the
        int_ Uid

        returns 404.
                    
        On an Outseta account that is not verified yet, updating a system email
        pauses all email

        sending of the account, as it does in the Outseta app.
      operationId: Template_UpdateTemplate
      parameters:
        - name: templateUid
          in: path
          required: true
          description: The Uid of the template, as returned by the list endpoint.
          schema:
            type: string
            nullable: true
          x-position: 1
      requestBody:
        x-name: template
        description: The fields to change.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTemplateRequest'
            example:
              Subject: Welcome to {{ CompanyName }}
        x-position: 2
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
        '400':
          description: Invalid Uid format
        '401':
          description: Unauthorized
        '404':
          description: Template not found
      security:
        - Bearer: []
        - ApiKey: []
components:
  schemas:
    UpdateTemplateRequest:
      type: object
      description: >-
        The fields of an email template that an update may change. Every field
        is optional:

        a field left out keeps its current value.
      additionalProperties: false
      properties:
        Body:
          type: string
          description: >-
            The HTML of the template. May use Liquid tokens, for example {{
            Person.FirstName }},

            and must keep every token in the template's RequiredTokens. Cannot
            be null.
        Description:
          type: string
          description: What the template is for. Cannot be changed for a system email.
          nullable: true
        Design:
          type: string
          description: >-
            The design of the template in the drag-and-drop editor, as JSON.
            Send null with a new

            Body so the editor opens the new Body as HTML instead of the old
            design.
          nullable: true
        Name:
          type: string
          description: >-
            The name of the template, shown in the Outseta app. Cannot be
            changed for a system

            email. Cannot be null.
        Subject:
          type: string
          description: >-
            The subject line of the email. May use Liquid tokens, for example {{
            CompanyName }}.
          nullable: true
    Template:
      example:
        Uid: string
        _objectType: string
        Created: string
        Updated: string
        ActivityEventData: {}
        Name: string
        Subject: string
        Body: string
        Design: string
        Description: string
        SystemName: string
        IsInternal: false
        AvailableTokens: string
        RequiredTokens: string
        Tag: string
      allOf:
        - $ref: '#/components/schemas/AbstractQcountBean'
        - type: object
          additionalProperties: false
          required:
            - Name
            - Body
          properties:
            Name:
              type: string
              maxLength: 250
              minLength: 1
            Subject:
              type: string
              maxLength: 1000
              nullable: true
            Body:
              type: string
              minLength: 1
            Design:
              type: string
              nullable: true
            Description:
              type: string
              maxLength: 1000
              nullable: true
            SystemName:
              type: string
              maxLength: 50
              nullable: true
            IsInternal:
              type: boolean
            AvailableTokens:
              type: string
              nullable: true
            RequiredTokens:
              type: string
              nullable: true
            Tag:
              type: string
              nullable: true
    AbstractQcountBean:
      allOf:
        - $ref: '#/components/schemas/AbstractBean'
        - type: object
          additionalProperties: false
          required:
            - Qcount_Id
          properties:
            ActivityEventData:
              nullable: true
    AbstractBean:
      type: object
      x-abstract: true
      additionalProperties: false
      required:
        - Id
        - Created
        - CreatedByUser_Id
        - Updated
        - UpdatedByUser_Id
      properties:
        Uid:
          type: string
          maxLength: 10
          nullable: true
        _objectType:
          type: string
          nullable: true
        Created:
          type: string
          readOnly: true
          format: date-time
          minLength: 1
        Updated:
          type: string
          readOnly: true
          format: date-time
          minLength: 1
  securitySchemes:
    Bearer:
      type: http
      description: Enter your access token (OAuth / JWT).
      scheme: bearer
      bearerFormat: JWT
    ApiKey:
      type: apiKey
      description: 'Enter: Outseta {api_key}:{api_secret}'
      name: Authorization
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.