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

# GET /api/admin/content/templates

> Get message templates



## OpenAPI

````yaml get /api/admin/content/templates
openapi: 3.1.0
info:
  title: Dittofeed API
  description: Dittofeed API Swagger Documentation
  version: 0.0.1
servers: []
security: []
paths:
  /api/admin/content/templates:
    get:
      tags:
        - Content
      description: Get message templates
      parameters:
        - schema:
            type: string
          in: query
          name: workspaceId
          required: true
        - schema:
            type: array
            items:
              type: string
          in: query
          name: ids
          required: false
        - schema:
            anyOf:
              - type: string
                enum:
                  - Declarative
              - type: string
                enum:
                  - Internal
          in: query
          name: resourceType
          required: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  templates:
                    type: array
                    items:
                      type: object
                      properties:
                        workspaceId:
                          type: string
                        id:
                          type: string
                        name:
                          type: string
                        type:
                          anyOf:
                            - type: string
                              enum:
                                - Email
                            - type: string
                              enum:
                                - MobilePush
                            - type: string
                              enum:
                                - Sms
                            - type: string
                              enum:
                                - Webhook
                        definition:
                          anyOf:
                            - description: Mobile push template resource
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - MobilePush
                                title:
                                  type: string
                                body:
                                  type: string
                                imageUrl:
                                  type: string
                                android:
                                  type: object
                                  properties:
                                    notification:
                                      type: object
                                      properties:
                                        channelId:
                                          type: string
                                  required:
                                    - notification
                              required:
                                - type
                            - description: Email template resource
                              anyOf:
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - Email
                                    from:
                                      type: string
                                    subject:
                                      type: string
                                    replyTo:
                                      type: string
                                    cc:
                                      type: string
                                    bcc:
                                      type: string
                                    name:
                                      type: string
                                    headers:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          name:
                                            type: string
                                          value:
                                            type: string
                                        required:
                                          - name
                                          - value
                                    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
                                    - from
                                    - subject
                                    - body
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - Email
                                    emailContentsType:
                                      type: string
                                      enum:
                                        - LowCode
                                    body:
                                      $ref: '#/components/schemas/def-0'
                                    from:
                                      type: string
                                    subject:
                                      type: string
                                    replyTo:
                                      type: string
                                    cc:
                                      type: string
                                    bcc:
                                      type: string
                                    name:
                                      type: string
                                    headers:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          name:
                                            type: string
                                          value:
                                            type: string
                                        required:
                                          - name
                                          - value
                                    attachmentUserProperties:
                                      description: >-
                                        Names of user properties to attach to
                                        the email as attachments.
                                      type: array
                                      items:
                                        type: string
                                  required:
                                    - type
                                    - emailContentsType
                                    - body
                                    - from
                                    - subject
                            - description: SMS template resource
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - Sms
                                body:
                                  type: string
                              required:
                                - type
                                - body
                            - description: Webhook template resource
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - Webhook
                                identifierKey:
                                  type: string
                                body:
                                  type: string
                              required:
                                - type
                                - identifierKey
                                - body
                        draft:
                          anyOf:
                            - description: Mobile push template resource
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - MobilePush
                                title:
                                  type: string
                                body:
                                  type: string
                                imageUrl:
                                  type: string
                                android:
                                  type: object
                                  properties:
                                    notification:
                                      type: object
                                      properties:
                                        channelId:
                                          type: string
                                  required:
                                    - notification
                              required:
                                - type
                            - description: Email template resource
                              anyOf:
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - Email
                                    from:
                                      type: string
                                    subject:
                                      type: string
                                    replyTo:
                                      type: string
                                    cc:
                                      type: string
                                    bcc:
                                      type: string
                                    name:
                                      type: string
                                    headers:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          name:
                                            type: string
                                          value:
                                            type: string
                                        required:
                                          - name
                                          - value
                                    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
                                    - from
                                    - subject
                                    - body
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - Email
                                    emailContentsType:
                                      type: string
                                      enum:
                                        - LowCode
                                    body:
                                      $ref: '#/components/schemas/def-0'
                                    from:
                                      type: string
                                    subject:
                                      type: string
                                    replyTo:
                                      type: string
                                    cc:
                                      type: string
                                    bcc:
                                      type: string
                                    name:
                                      type: string
                                    headers:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          name:
                                            type: string
                                          value:
                                            type: string
                                        required:
                                          - name
                                          - value
                                    attachmentUserProperties:
                                      description: >-
                                        Names of user properties to attach to
                                        the email as attachments.
                                      type: array
                                      items:
                                        type: string
                                  required:
                                    - type
                                    - emailContentsType
                                    - body
                                    - from
                                    - subject
                            - description: SMS template resource
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - Sms
                                body:
                                  type: string
                              required:
                                - type
                                - body
                            - description: Webhook template resource
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - Webhook
                                identifierKey:
                                  type: string
                                body:
                                  type: string
                              required:
                                - type
                                - identifierKey
                                - body
                        updatedAt:
                          type: number
                      required:
                        - workspaceId
                        - id
                        - name
                        - type
                        - updatedAt
                required:
                  - templates
components:
  schemas:
    def-0:
      title: LowCodeEmailJsonBody
      type: object
      properties:
        type:
          type: string
        attrs:
          type: object
          additionalProperties: {}
        content:
          type: array
          items:
            $ref: '#/components/schemas/def-0'
        marks:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              attrs:
                type: object
                additionalProperties: {}
            required:
              - type
        text:
          type: string

````