# Publish template content

Publish the content of your template to make it available for sending. When you publish, it is always the most recent draft content that is published. Verify that your most recent draft is the content you wish to publish. To obtain a valid id, first call GET /v1/REST/templates to list your templates.

Endpoint: POST /v1/REST/templates/{id}/contents/publish
Version: 1.0.0
Security: basicAuth, bearerAuth

## Path parameters:

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

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