# Email Templates

Email Templates are the building blocks of your email marketing. They contain the subject line, HTML content, and track performance metrics like open and click rates. Templates are used in sequences, workflows, and broadcasts. The Email Templates API allows you to retrieve template details and update template content programmatically.

## Available Endpoints

| Method                                                      | Endpoint                                                                        | Name                                                                     |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|  |  | [Get Email Template](/docs/email_templates_api#get-email-template)       |
|  |  | [Update Email Template](/docs/email_templates_api#update-email-template) |

## The Email Template Model


  
    The email template model represents a reusable email with its content and performance statistics.
  
  
    ### Properties

    
      - **id** (`integer`): 
        The unique identifier for the template
      
      - **name** (`string`): 
        The name of the template
      
      - **subject** (`string`): 
        The email subject line
      
      - **html** (`string`): 
        The HTML content of the email
      
      - **created_at** (`datetime`): 
        When the template was created
      
      - **stats** (`object`): 
        Performance statistics including open_rate and click_rate
      
    

  


---

## Get Email Template {{ tag: 'GET', label: '/v1/fetch/emails/templates/:id' }}


  
    Retrieves a single email template by its ID, including the full HTML content and performance statistics.

    ### Path Parameters
    
      - **id** (`integer`): 
        The template ID
      
    

    ### Query Parameters
    
      - **site_uuid** (`string`): 
        Your site's unique identifier
      
    

  
  
    
  

<br/><br/>

  
    ### Response
    Returns the email template with its full content and stats.

  
  
    
  


---

## Update Email Template {{ tag: 'PATCH', label: '/v1/fetch/emails/templates/:id' }}


  
    Updates an existing email template. You can update the subject line, HTML content, or both.

    
> Only the fields you include in the request will be updated. Omitted fields remain unchanged.


    ### Path Parameters
    
      - **id** (`integer`): 
        The template ID
      
    

    ### Query Parameters
    
      - **site_uuid** (`string`): 
        Your site's unique identifier
      
    

    ### Request Body
    
      - **email_template.subject** (`string`): 
        The new email subject line (optional)
      
      - **email_template.html** (`string`): 
        The new HTML content (optional)
      
    

  
  
    
  

<br/><br/>

  
    ### Response
    Returns the updated email template.