# List of templates

Retrieve a comprehensive list of templates and their corresponding data, including the ExternalID which is needed to send your templates.

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

## Query parameters:

  - `Sort` (string)
    Sort results by a property. Available: Name, CreatedAt, IsStarred, UpdatedAt. Default: ID ASC. Example: Sort=Name+DESC

  - `CheckLocaleOnLastContent` (boolean)
    Set to true to check the value of the Locale query parameter based on the last content.

  - `ID` (integer)
    Search by the ID of the template.

  - `IDs` (array)
    Search by multiple template IDs.

  - `Name` (string)
    Search by the template name. Only returns exact match.

  - `PartialName` (string)
    Search by partial or fragmentary name.

  - `Locale` (string)
    Search by the template locale.

  - `EditMode` (integer)
    Filter by edit mode. Accepted values: 1, 2, 3 or 4.

  - `LabelIDs` (array)
    Search by label IDs associated to a template.

  - `Purposes` (string)
    Comma-separated list of purposes. Filters templates having all specified purposes. Accepted values — marketing, transactional, opt-in, automation.

  - `ExternalID` (string)
    Search by the send ID of the template.

  - `IsPublished` (boolean)
    Filter by published status. True = published.

  - `IsStarred` (boolean)
    Filter by favorite status. True = favorite.

  - `Limit` (integer)
    The number of results returned per page. Default: 10, maximum: 1000.
    Example: 10

  - `Offset` (integer)
    The index of the first object in the page.

## 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 429 fields

## Response 500 fields
