# Create a template

Create a new email template. This is the first step before adding content to it. Once your template has been successfully created, use the Create Template Content endpoint to add and customize the content.

Endpoint: POST /v1/REST/templates
Version: 1.0.0
Security: basicAuth, bearerAuth

## Request fields (application/json):

  - `Name` (string, required)
    Required. A unique identifier for the template.

  - `EditMode` (integer)
    Specifies the mode in which the template can be edited. Default: 2 (HTML builder). Values: 2 (HTML builder), 4 (MJML builder).

  - `LabelIDs` (array)
    Labels associated with the template.

  - `Purposes` (array)
    Required if you would like the template to appear in the UI.
    Enum: "marketing", "transactional", "automation", "opt-in"

  - `Description` (string,null)
    A brief description of the template.

  - `IsStarred` (boolean)
    Indicates whether the template is marked as a favorite.

  - `IsTextPartGenerationEnabled` (boolean)
    Determines if text part generation functionality is enabled for this template.

## Response 201 fields (application/json):

  - `Count` (integer)
    Number of items in this response

  - `Data` (array)

  - `Data.ID` (integer)
    The ID of the template.

  - `Data.Name` (string)
    The name of the template.

  - `Data.EditMode` (integer)
    Specifies the mode in which the template can be edited. Values: 1 (Drag-and-drop), 2 (HTML builder), 3 (Saved Section), 4 (MJML builder).

  - `Data.LabelIDs` (array)
    An array of IDs representing labels associated with the template.

  - `Data.Purposes` (array)
    The purposes of the template. Accepted values: marketing, transactional, automation, opt-in.

  - `Data.ExternalID` (string,null)
    The ID that must be used to send the template.

  - `Data.Description` (string,null)
    A brief description of the template.

  - `Data.IsPublished` (boolean)
    Indicates whether the template is published.

  - `Data.IsStarred` (boolean)
    Indicates whether the template is marked as a favorite.

  - `Data.IsTextPartGenerationEnabled` (boolean)
    Determines if text part generation functionality is enabled for this template.

  - `Data.CreatedAt` (string)
    The date and time when the template was created (RFC3339).

  - `Data.UpdatedAt` (string)
    The date and time when the template was last updated (RFC3339).

  - `Total` (integer)
    Total number of items available


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 429 fields

## Response 500 fields
