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

# Templates preview

> Feature-gated personal-key operation. Scope, saved grants, current role and resource ownership all apply. Billing is excluded.

Requires the messaging rollout flag and explicit personal-key permissions. Live publishing and lifecycle changes require an expiring preparation and idempotent execution.


## OpenAPI

````yaml api-reference/openapi.json GET /templates/{id}/preview
openapi: 3.0.1
info:
  title: Sendrealm API
  description: >-
    API for email, push, audience resources, domains, campaign drafts,
    templates, events, topics, and automations
  license:
    name: MIT
  version: 0.3.0
servers:
  - url: https://api.sendrealm.com
security:
  - bearerAuth: []
paths:
  /templates/{id}/preview:
    get:
      tags:
        - Agent messaging
      summary: Templates preview
      description: >-
        Feature-gated personal-key operation. Scope, saved grants, current role
        and resource ownership all apply. Billing is excluded.
      operationId: templates_preview
      parameters:
        - name: X-Sendrealm-Project-Id
          in: header
          required: true
          schema:
            type: string
            format: uuid
          description: Explicit authorized project. Its team is derived server-side.
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  data:
                    $ref: '#/components/schemas/McpTemplatePreview'
                required:
                  - status
                  - data
                additionalProperties: false
                x-sendrealm-mcp-contract: true
components:
  schemas:
    McpTemplatePreview:
      type: object
      properties:
        id:
          type: string
          format: uuid
        channel:
          type: string
          enum:
            - email
            - push
        version_id:
          type: string
          format: uuid
          nullable: true
        subject:
          type: string
          maxLength: 1000000
          nullable: true
        rendered_html:
          type: string
          maxLength: 1000000
          nullable: true
        rendered_text:
          type: string
          maxLength: 1000000
          nullable: true
        messages:
          type: array
          items:
            $ref: '#/components/schemas/McpTemplatePushMessage'
        readiness:
          type: object
          properties:
            ready:
              type: boolean
            reasons:
              type: array
              items:
                type: string
          required:
            - ready
            - reasons
          additionalProperties: false
          x-sendrealm-mcp-contract: true
      required:
        - id
        - channel
        - version_id
        - subject
        - rendered_html
        - rendered_text
        - messages
        - readiness
      additionalProperties: false
      x-sendrealm-mcp-contract: true
    McpTemplatePushMessage:
      type: object
      properties:
        locale:
          type: string
          minLength: 1
          maxLength: 35
        title:
          type: string
          maxLength: 2000
        message:
          type: string
          maxLength: 10000
        image_url:
          type: string
          maxLength: 1000000
          nullable: true
          format: uri
        launch_url:
          type: string
          maxLength: 1000000
          nullable: true
          format: uri
      required:
        - locale
      additionalProperties: false
      x-sendrealm-mcp-contract: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Integration key for backend workloads, or a scoped personal key
        (sr_user_) for account discovery and supported project operations. MCP
        accepts only personal keys.

````

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