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

# Render a template

> Returns the subject, HTML and text a send would produce, without sending anything. Renders the
draft by default, filling missing variables with their example; pass `version` to render a
published version with the same checks as a real send.



## OpenAPI

````yaml /openapi.json post /templates/{template}/render
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}/render:
    post:
      tags:
        - Templates
      summary: Render a template
      description: >-
        Returns the subject, HTML and text a send would produce, without sending
        anything. Renders the

        draft by default, filling missing variables with their example; pass
        `version` to render a

        published version with the same checks as a real send.
      operationId: v1.templates.render
      parameters:
        - name: template
          in: path
          required: true
          description: The template slug, or its ID prefixed `tpl_`.
          schema:
            type: string
          example: otp-login
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  description: The variables, as you would send them.
                  examples:
                    - code: '482913'
                version:
                  type: integer
                  description: A published version to render instead of the draft.
                  examples:
                    - 3
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: rendered_template
                  version:
                    type:
                      - 'null'
                      - string
                      - integer
                  subject:
                    type: string
                  html:
                    type: string
                  text:
                    type: string
                  from:
                    type:
                      - string
                      - 'null'
                required:
                  - object
                  - version
                  - subject
                  - html
                  - text
                  - from
components:
  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.