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

# Render a message template

> Render message template.



## OpenAPI

````yaml post /api/admin/content/templates/render
openapi: 3.1.0
info:
  title: Tranthor API
  description: Tranthor API Swagger Documentation
  version: 0.0.1
servers: []
security: []
paths:
  /api/admin/content/templates/render:
    post:
      tags:
        - Content
      description: Render message template.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspaceId:
                  type: string
                channel:
                  anyOf:
                    - type: string
                      enum:
                        - Email
                    - type: string
                      enum:
                        - MobilePush
                    - type: string
                      enum:
                        - Sms
                    - type: string
                      enum:
                        - Webhook
                    - type: string
                      enum:
                        - Whatsapp
                subscriptionGroupId:
                  type: string
                contents:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: object
                        properties:
                          type:
                            const: PlainText
                            type: string
                          value:
                            type: string
                          codeFormat:
                            anyOf:
                              - const: html
                                type: string
                              - const: mjml
                                type: string
                              - const: react-email
                                type: string
                        required:
                          - type
                          - value
                      - type: object
                        properties:
                          type:
                            const: Mjml
                            type: string
                          value:
                            type: string
                          codeFormat:
                            anyOf:
                              - const: html
                                type: string
                              - const: mjml
                                type: string
                              - const: react-email
                                type: string
                        required:
                          - type
                          - value
                userProperties:
                  type: object
                  additionalProperties: {}
                tags:
                  type: object
                  additionalProperties:
                    type: string
                locale:
                  pattern: ^[a-z]{2,3}(-[A-Z]{2})?$
                  description: 'BCP-47 language tag: ''en'', ''ar'', or ''ar-EG'''
                  type: string
              required:
                - workspaceId
                - channel
                - contents
                - userProperties
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  contents:
                    type: object
                    additionalProperties:
                      anyOf:
                        - type: object
                          properties:
                            type:
                              const: Ok
                              type: string
                            value:
                              type: string
                          required:
                            - type
                            - value
                        - type: object
                          properties:
                            type:
                              const: Err
                              type: string
                            err:
                              type: string
                          required:
                            - type
                            - err
                  diagnostics:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: object
                        properties:
                          severity:
                            anyOf:
                              - const: error
                                type: string
                              - const: warning
                                type: string
                          source:
                            anyOf:
                              - const: liquid
                                type: string
                              - const: variable
                                type: string
                              - const: mjml-structure
                                type: string
                              - const: mjml
                                type: string
                          line:
                            type: number
                          column:
                            type: number
                          message:
                            type: string
                        required:
                          - severity
                          - source
                          - line
                          - message
                required:
                  - contents
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - adminApiKey: []
components:
  securitySchemes:
    adminApiKey:
      type: http
      scheme: bearer
      description: >-
        An Admin API key, sent as `Authorization: Bearer <key>`. Create one in
        Settings.

````

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