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

# POST /api/admin/content/templates/test

> Send a test message for a message template.



## OpenAPI

````yaml post /api/admin/content/templates/test
openapi: 3.1.0
info:
  title: Dittofeed API
  description: Dittofeed 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
                        - type: string
                          enum:
                            - Gmail
                  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:
                            - SignalWire
                        - 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:
                            - 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
                    provider:
                      type: 'null'
                  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:
                                  - DFInternalMessageSent
                              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:
                                                  - Gmail
                                              messageId:
                                                type: string
                                              threadId:
                                                type: string
                                            required:
                                              - type
                                              - messageId
                                              - threadId
                                          - 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
                                      attachments:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            mimeType:
                                              type: string
                                            name:
                                              type: string
                                          required:
                                            - mimeType
                                            - name
                                      from:
                                        type: string
                                      subject:
                                        type: string
                                      replyTo:
                                        type: string
                                      cc:
                                        type: string
                                      bcc:
                                        type: string
                                      name:
                                        type: string
                                      attachmentUserProperties:
                                        description: >-
                                          Names of user properties to attach to
                                          the email as attachments.
                                        type: array
                                        items:
                                          type: string
                                      emailContentsType:
                                        type: string
                                        enum:
                                          - Code
                                      body:
                                        type: string
                                    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:
                                                  - SignalWire
                                              status:
                                                type: string
                                              sid:
                                                type: string
                                            required:
                                              - type
                                              - status
                                              - 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:
                                              anyOf:
                                                - type: string
                                                - type: number
                                                - type: array
                                                  items:
                                                    type: string
                                                - type: 'null'
                                                - type: boolean
                                          body: {}
                                    required:
                                      - type
                                      - to
                                      - request
                                      - response
                            required:
                              - type
                              - variant
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - DFMessageSkipped
                              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

````