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

# Send a test message

> Send a test message for a message template.



## OpenAPI

````yaml post /api/admin/content/templates/test
openapi: 3.1.0
info:
  title: Tranthor API
  description: Tranthor API Swagger Documentation
  version: 0.0.1
servers: []
security: []
paths:
  /api/admin/content/templates/test:
    post:
      tags:
        - Content
      description: Send a test message for a message template.
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    workspaceId:
                      type: string
                    templateId:
                      type: string
                    userProperties:
                      type: object
                      additionalProperties: {}
                    tags:
                      type: object
                      additionalProperties:
                        type: string
                    channel:
                      type: string
                      enum:
                        - Email
                    provider:
                      anyOf:
                        - type: string
                          enum:
                            - SendGrid
                        - type: string
                          enum:
                            - AmazonSes
                        - type: string
                          enum:
                            - Resend
                        - type: string
                          enum:
                            - PostMark
                        - type: string
                          enum:
                            - Smtp
                        - type: string
                          enum:
                            - Test
                        - type: string
                          enum:
                            - MailChimp
                  required:
                    - workspaceId
                    - templateId
                    - userProperties
                    - channel
                - type: object
                  properties:
                    workspaceId:
                      type: string
                    templateId:
                      type: string
                    userProperties:
                      type: object
                      additionalProperties: {}
                    tags:
                      type: object
                      additionalProperties:
                        type: string
                    channel:
                      type: string
                      enum:
                        - Sms
                    provider:
                      anyOf:
                        - type: string
                          enum:
                            - Twilio
                        - type: string
                          enum:
                            - Test
                  required:
                    - workspaceId
                    - templateId
                    - userProperties
                    - channel
                - type: object
                  properties:
                    workspaceId:
                      type: string
                    templateId:
                      type: string
                    userProperties:
                      type: object
                      additionalProperties: {}
                    tags:
                      type: object
                      additionalProperties:
                        type: string
                    channel:
                      type: string
                      enum:
                        - MobilePush
                    provider:
                      anyOf:
                        - type: string
                          enum:
                            - Firebase
                        - type: string
                          enum:
                            - Apns
                        - type: string
                          enum:
                            - Test
                  required:
                    - workspaceId
                    - templateId
                    - userProperties
                    - channel
                - type: object
                  properties:
                    workspaceId:
                      type: string
                    templateId:
                      type: string
                    userProperties:
                      type: object
                      additionalProperties: {}
                    tags:
                      type: object
                      additionalProperties:
                        type: string
                    channel:
                      type: string
                      enum:
                        - Webhook
                  required:
                    - workspaceId
                    - templateId
                    - userProperties
                    - channel
                - type: object
                  properties:
                    workspaceId:
                      type: string
                    templateId:
                      type: string
                    userProperties:
                      type: object
                      additionalProperties: {}
                    tags:
                      type: object
                      additionalProperties:
                        type: string
                    channel:
                      type: string
                      enum:
                        - Whatsapp
                    provider:
                      anyOf:
                        - type: string
                          enum:
                            - Twilio
                        - type: string
                          enum:
                            - Test
                  required:
                    - workspaceId
                    - templateId
                    - userProperties
                    - channel
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - Ok
                      value:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - TRInternalMessageSent
                              variant:
                                anyOf:
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - Email
                                      provider:
                                        anyOf:
                                          - type: object
                                            properties:
                                              type:
                                                type: string
                                                enum:
                                                  - MailChimp
                                            required:
                                              - type
                                          - type: object
                                            properties:
                                              type:
                                                type: string
                                                enum:
                                                  - SendGrid
                                            required:
                                              - type
                                          - type: object
                                            properties:
                                              type:
                                                type: string
                                                enum:
                                                  - AmazonSes
                                              messageId:
                                                type: string
                                            required:
                                              - type
                                          - type: object
                                            properties:
                                              type:
                                                type: string
                                                enum:
                                                  - PostMark
                                            required:
                                              - type
                                          - type: object
                                            properties:
                                              type:
                                                type: string
                                                enum:
                                                  - Resend
                                            required:
                                              - type
                                          - type: object
                                            properties:
                                              type:
                                                type: string
                                                enum:
                                                  - Smtp
                                              messageId:
                                                type: string
                                            required:
                                              - type
                                              - messageId
                                          - type: object
                                            properties:
                                              type:
                                                type: string
                                                enum:
                                                  - Test
                                            required:
                                              - type
                                      to:
                                        type: string
                                      headers:
                                        type: object
                                        additionalProperties:
                                          type: string
                                      from:
                                        type: string
                                      subject:
                                        type: string
                                      replyTo:
                                        type: string
                                      previewText:
                                        maxLength: 500
                                        description: >-
                                          The preview line inboxes show beside the
                                          subject (the preheader). Can use Liquid.
                                        type: string
                                      attachmentUserProperties:
                                        description: >-
                                          Names of user properties to attach to
                                          the email as attachments.
                                        type: array
                                        items:
                                          type: string
                                      body:
                                        type: string
                                      codeFormat:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - html
                                          - type: string
                                            enum:
                                              - mjml
                                          - type: string
                                            enum:
                                              - react-email
                                      localizationEnabled:
                                        type: boolean
                                      localizations:
                                        type: object
                                        additionalProperties:
                                          type: object
                                          properties:
                                            description:
                                              type: string
                                            from:
                                              type: string
                                            subject:
                                              type: string
                                            body:
                                              type: string
                                            replyTo:
                                              type: string
                                            previewText:
                                              maxLength: 500
                                              type: string
                                          required:
                                            - subject
                                            - body
                                    required:
                                      - type
                                      - provider
                                      - to
                                      - from
                                      - subject
                                      - body
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - Sms
                                      provider:
                                        anyOf:
                                          - type: object
                                            properties:
                                              type:
                                                type: string
                                                enum:
                                                  - Twilio
                                              sid:
                                                type: string
                                            required:
                                              - type
                                              - sid
                                          - type: object
                                            properties:
                                              type:
                                                type: string
                                                enum:
                                                  - Test
                                            required:
                                              - type
                                      to:
                                        type: string
                                      body:
                                        type: string
                                    required:
                                      - type
                                      - provider
                                      - to
                                      - body
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - Webhook
                                      to:
                                        type: string
                                      request:
                                        type: object
                                        properties:
                                          url:
                                            type: string
                                          method:
                                            type: string
                                          headers:
                                            type: object
                                            additionalProperties:
                                              type: string
                                          params: {}
                                          data: {}
                                          responseType:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - json
                                              - type: string
                                                enum:
                                                  - text
                                      response:
                                        type: object
                                        properties:
                                          status:
                                            type: number
                                          headers:
                                            type: object
                                            additionalProperties:
                                              type: string
                                          body: {}
                                        required:
                                          - body
                                      durationMs:
                                        type: number
                                    required:
                                      - type
                                      - to
                                      - request
                                      - response
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - Whatsapp
                                      provider:
                                        anyOf:
                                          - type: object
                                            properties:
                                              type:
                                                type: string
                                                enum:
                                                  - Twilio
                                              sid:
                                                type: string
                                            required:
                                              - type
                                              - sid
                                          - type: object
                                            properties:
                                              type:
                                                type: string
                                                enum:
                                                  - Test
                                            required:
                                              - type
                                      to:
                                        type: string
                                      contentSid:
                                        type: string
                                      contentVariables:
                                        type: object
                                        additionalProperties:
                                          type: string
                                    required:
                                      - type
                                      - provider
                                      - to
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - MobilePush
                                      title:
                                        type: string
                                      body:
                                        type: string
                                      attempts:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            installationId:
                                              type: string
                                            platform:
                                              anyOf:
                                                - type: string
                                                  enum:
                                                    - ios
                                                - type: string
                                                  enum:
                                                    - android
                                            providerType:
                                              anyOf:
                                                - type: string
                                                  enum:
                                                    - Firebase
                                                - type: string
                                                  enum:
                                                    - Apns
                                                - type: string
                                                  enum:
                                                    - Test
                                            deliveryId:
                                              type: string
                                            outcome:
                                              anyOf:
                                                - type: string
                                                  enum:
                                                    - accepted
                                                - type: string
                                                  enum:
                                                    - unregistered
                                                - type: string
                                                  enum:
                                                    - tokenRejected
                                                - type: string
                                                  enum:
                                                    - permanent
                                                - type: string
                                                  enum:
                                                    - transient
                                                - type: string
                                                  enum:
                                                    - credential
                                            providerMessageId:
                                              type: string
                                            reason:
                                              type: string
                                          required:
                                            - installationId
                                            - platform
                                            - providerType
                                            - deliveryId
                                            - outcome
                                    required:
                                      - type
                                      - attempts
                            required:
                              - type
                              - variant
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - TRMessageSkipped
                              message:
                                type: string
                            required:
                              - type
                    required:
                      - type
                      - value
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - Err
                      err:
                        type: object
                        properties:
                          suggestions:
                            type: array
                            items:
                              type: string
                          responseData:
                            type: string
                        required:
                          - suggestions
                    required:
                      - type
                      - err
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: An empty String
          content:
            application/json:
              schema:
                description: An empty String
                type: string
      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.