# Update a template

Update a template using its unique ID. Add new labels, modify the name, add it as a favorite and more. All PUT requests behave like PATCH requests — only the specified properties are updated. To obtain a valid id, first call GET /v1/REST/templates to list your templates.

Endpoint: PUT /v1/REST/templates/{id}
Version: 1.0.0
Security: basicAuth, bearerAuth

## Path parameters:

  - `id` (integer, required)
    The ID of the template.
    Example: 101

## Request fields (application/json):

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

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

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

  - `Purposes` (array)
    The purposes of the template.
    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 200 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 404 fields

## Response 429 fields

## Response 500 fields
