# Get template content by status

Retrieve the most recent content of your template based on its status. This endpoint allows you to access specific versions of your template content based on their status — Draft, Published, or Autosave. To obtain a valid id, first call GET /v1/REST/templates to list your templates.

Endpoint: GET /v1/REST/templates/{id}/contents/types/{content_type}
Version: 1.0.0
Security: basicAuth, bearerAuth

## Path parameters:

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

  - `content_type` (string, required)
    The content status to retrieve. Accepted values: D (Draft), P (Published), A (Autosave).
    Enum: "D", "P", "A"

## Response 200 fields (application/json):

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

  - `Data` (array)

  - `Data.ID` (integer)
    The ID of the content version.

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

  - `Data.ContentType` (string)
    Content status. Values: D (Draft), P (Published), A (Autosave). Always D when created.

  - `Data.Author` (string,null)
    The name of the person or entity creating the template content.

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

  - `Data.IsLocked` (boolean)
    If true, the template content cannot be edited.

  - `Data.Locale` (string)
    Specifies the locale (language and region) for the template content.

  - `Data.MJMLPart` (string,null)
    The MJML code for the template.

  - `Data.HTMLPart` (string,null)
    The HTML code for the template.

  - `Data.TextPart` (string,null)
    The plain text version of the template content.

  - `Data.Headers` (object)
    Additional headers for the template in JSON format (Subject, From, Reply-To, SenderName, SenderEmail).

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

  - `Data.UpdatedAt` (string)
    The date and time when the content 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
