> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pulse-send.jiordiviera.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a template

> Returns the draft and the number of the published version. An old slug still finds the template.



## OpenAPI

````yaml /openapi.json get /templates/{template}
openapi: 3.1.2
info:
  title: PulseSend API
  version: 1.0.0
  description: >-
    Send transactional email over HTTP. Authenticate with a `ps_live_` or
    `ps_test_` key.
servers:
  - url: https://pulse-send.jiordiviera.me/api/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Emails
  - name: Files
  - name: Templates
paths:
  /templates/{template}:
    get:
      tags:
        - Templates
      summary: Retrieve a template
      description: >-
        Returns the draft and the number of the published version. An old slug
        still finds the template.
      operationId: v1.templates.show
      parameters:
        - name: template
          in: path
          required: true
          description: The template slug, or its ID prefixed `tpl_`.
          schema:
            type: string
          example: otp-login
      responses:
        '200':
          description: '`TemplateResource`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateResource'
components:
  schemas:
    TemplateResource:
      type: object
      properties:
        object:
          type: string
          const: template
        id:
          type: string
        name:
          type: string
        slug:
          type: string
        aliases:
          type: object
          additionalProperties: []
        subject:
          type: string
          description: 'Le brouillon : ce que publish publiera.'
        from:
          type:
            - string
            - 'null'
        html:
          type: string
        text:
          type:
            - string
            - 'null'
        variables:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              required:
                type: boolean
              default:
                type:
                  - string
                  - 'null'
              example:
                type:
                  - string
                  - 'null'
            required:
              - name
              - required
              - default
              - example
        published_version:
          type:
            - integer
            - 'null'
        has_unpublished_changes:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - object
        - id
        - name
        - slug
        - aliases
        - subject
        - from
        - html
        - text
        - variables
        - published_version
        - has_unpublished_changes
        - created_at
        - updated_at
      title: TemplateResource
  securitySchemes:
    apiKey:
      type: http
      description: Your API key, `ps_live_…` or `ps_test_…`.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.