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

---
id: 1e87b9e0-0c3a-49d6-9016-c8381ae42282
---

# Email templates (BETA)

> Create and manage sales email templates in HubSpot.

export const RequiredIndicator = () => {
  return <span className="required-indicator">
      required
    </span>;
};

export const BetaDisclaimerBanner = () => <Warning>
        This functionality is currently in beta. By participating in this beta, you agree to HubSpot's <a href="https://legal.hubspot.com/developer-terms">Developer Terms</a> and <a href="https://legal.hubspot.com/developerbetaterms">Developer Beta Terms</a>. Note that the functionality is still under active development and is subject to change based on testing and feedback.
    </Warning>;

export const ScopesList = ({scopes = [], description = "This API requires one of the following scopes:"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList
    scopes={[
  'sales-templates-public-read',
  'sales-templates-public-write'
]}
  />
</Accordion>

<BetaDisclaimerBanner />

Use the email templates API to create and manage sales [email templates](https://knowledge.hubspot.com/templates/create-and-send-templates) in your HubSpot account. Sales email templates are reusable email layouts that your team can use to send consistent, personalized emails to contacts.

## Create an email template

To create a new email template, make a `POST` request to `/automation/email-templates/2026-09-beta/`. In your request body, include the template's `name` and `body`, and optionally include the email's `subject` and `folderId`.

For example, the request body will resemble the following:

```json theme={null}
{
  "name": "Welcome follow-up",
  "subject": "Following up on your interest",
  "body": "<p>Hi {{contact.firstname}},</p><p>Thanks for your interest in our product. I'd love to schedule a quick call to discuss how we can help.</p><p>Best,<br>{{sender.firstname}}</p>",
  "folderId": "123456"
}
```

| Parameter                    | Type   | Description                                    |
| ---------------------------- | ------ | ---------------------------------------------- |
| `name` <RequiredIndicator /> | String | The name of the email template.                |
| `body` <RequiredIndicator /> | String | The HTML body content of the email template.   |
| `subject`                    | String | The subject line of the email template.        |
| `folderId`                   | String | The ID of the folder to place the template in. |

The response will include the template's details, including the template's unique `id` and other metadata.

```json theme={null}
{
  "id": "987654321",
  "name": "Welcome follow-up",
  "subject": "Following up on your interest",
  "body": "<p>Hi {{contact.firstname}},</p><p>Thanks for your interest in our product. I'd love to schedule a quick call to discuss how we can help.</p><p>Best,<br>{{sender.firstname}}</p>",
  "folderId": "123456",
  "ownerId": "2222222",
  "createdAt": 1722470400000,
  "updatedAt": 1722470400000
}
```

## Retrieve email templates

You can retrieve all email templates or a specific template by its ID.

### Retrieve all email templates

To retrieve a list of all email templates, make a `GET` request to `/automation/email-templates/2026-09-beta/`.

You can include the following query parameters in your request URL:

| Parameter | Description                                                                                                                                                      |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit`   | The maximum number of results to display per page. Default is `20`.                                                                                              |
| `after`   | The paging cursor token of the last successfully read resource. Use the `paging.next.after` value from a previous response to retrieve the next page of results. |

For example, to retrieve 50 email templates, your request URL would be `GET` `/automation/email-templates/2026-09-beta?limit=50`.

The code block below provides an example response, highlighting the `after` property, under the `paging object`, used as a cursor to retrieve the next page of results (e.g., `/automation/email-templates/2026-09-beta?limit=50&after={after}`).

```json highlight={16} theme={null}
{
  "results": [
    {
      "id": "987654321",
      "name": "Welcome follow-up",
      "subject": "Following up on your interest",
      "body": "<p>Hi {{contact.firstname}},</p>...",
      "folderId": "123456",
      "ownerId": "2222222",
      "createdAt": 1722470400000,
      "updatedAt": 1722470400000
    }
  ],
  "paging": {
    "next": {
      "after": "987654322",
      "link": "https://api.hubapi.com/automation/email-templates/2026-09-beta?limit=50&after=987654322"
    }
  }
}
```

### Retrieve a specific email template

To retrieve a specific email template, make a `GET` request to `/automation/email-templates/2026-09-beta/{templateId}`. Use the template's `id` as the `templateId` path parameter.

For example, to retrieve a template with ID `987654321`, make a `GET` request to `/automation/email-templates/2026-09-beta/987654321`.

The response would resemble the following:

```json theme={null}
{
  "id": "987654321",
  "name": "Welcome follow-up",
  "subject": "Following up on your interest",
  "body": "<p>Hi {{contact.firstname}},</p><p>Thanks for your interest in our product. I'd love to schedule a quick call to discuss how we can help.</p><p>Best,<br>{{sender.firstname}}</p>",
  "folderId": "123456",
  "ownerId": "2222222",
  "createdAt": 1722470400000,
  "updatedAt": 1722470400000
}
```

## Update an email template

To update an existing email template, make a `PATCH` request to `/automation/email-templates/2026-09-beta/{templateId}`. Use the template's `id` as the `templateId` path parameter. In the request body, include the fields you want to update.

For example, to update a template's name and subject, the request body would resemble the following:

```json theme={null}
{
  "name": "Welcome follow-up - Updated",
  "subject": "Quick follow-up"
}
```

| Parameter  | Type   | Description                                          |
| ---------- | ------ | ---------------------------------------------------- |
| `name`     | String | The updated name of the email template.              |
| `subject`  | String | The updated subject line of the email template.      |
| `body`     | String | The updated HTML body content of the email template. |
| `folderId` | String | The updated folder ID for the template.              |

The response will include the updated template details:

```json theme={null}
{
  "id": "987654321",
  "name": "Welcome follow-up - Updated",
  "subject": "Quick follow-up",
  "body": "<p>Hi {{contact.firstname}},</p><p>Thanks for your interest in our product. I'd love to schedule a quick call to discuss how we can help.</p><p>Best,<br>{{sender.firstname}}</p>",
  "folderId": "123456",
  "ownerId": "2222222",
  "createdAt": 1722470400000,
  "updatedAt": 1722556800000
}
```

## Retrieve folders

Folders are used to organize email templates in your HubSpot account. To retrieve a list of all folders, make a `GET` request to `/automation/email-templates/2026-09-beta/folders`.

You can include the following query parameters in your request URL:

| Parameter | Description                                                                                                                                                      |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit`   | The maximum number of results to display per page. Default is `20`.                                                                                              |
| `after`   | The paging cursor token of the last successfully read resource. Use the `paging.next.after` value from a previous response to retrieve the next page of results. |

For example, to retrieve a list of folders and limit the results to 50 entries, your request URL would be `GET` `/automation/email-templates/2026-09-beta/folders?limit=50`.

The response will resemble the following:

```json theme={null}
{
  "results": [
    {
      "id": "123456",
      "name": "Onboarding templates",
      "createdAt": 1722470400000,
      "updatedAt": 1722470400000
    }
  ],
  "paging": {
    "next": {
      "after": "123457",
      "link": "https://api.hubapi.com/automation/email-templates/2026-09-beta/folders?limit=50&after=123457"
    }
  }
}
```
