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

# List Message Templates

> List all available message templates.



## OpenAPI

````yaml get /message-templates/
openapi: 3.1.0
info:
  title: thanks.io API
  description: >-
    Use the thanks.io API to send postcards, letters, notecards, windowless
    letters, and gift cards.
  contact:
    url: https://www.thanks.io
    email: support@thanks.io
  version: 1.0.0
servers:
  - url: https://api.thanks.io/api/v2
    description: The main API server for thanks.io
security:
  - bearerAuth: []
tags:
  - name: Recipients
  - name: Mailing Lists
  - name: Send Mailer
  - name: Orders
  - name: Message Templates
  - name: Image Templates
  - name: Handwriting Styles
  - name: Giftcards
  - name: Dynamic Images
    description: ''
  - name: Image Builder
  - name: Sub Accounts
externalDocs:
  description: Learn more about thanks.io
  url: https://docs.thanks.io
paths:
  /message-templates/:
    get:
      tags:
        - Message Templates
      summary: List All
      description: List all available message templates.
      operationId: getMessageTemplates
      parameters:
        - $ref: '#/components/parameters/items_per_page'
        - $ref: '#/components/parameters/sub_account_id'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/message-template'
                  links:
                    $ref: '#/components/schemas/links'
                  meta:
                    $ref: '#/components/schemas/meta'
              example:
                data:
                  - id: 2
                    user_id: 2
                    sub_account_id: null
                    handwriting_style_id: 18
                    font_size: null
                    font_color: null
                    realism: null
                    name: Thank You Message Templates
                    content: >-
                      Hey %FIRST_NAME%!,


                      THANK YOU for allowing us the opportunity to HELP you with
                      your plan!
                    additional_pages: null
                    skip_creative_generation: 0
                    custom_background_url: null
                    qrcode_url: null
                    cc_emails: []
                    created_at: '2018-08-08T02:56:59.000000Z'
                    updated_at: '2025-02-12T05:13:15.000000Z'
                    type: notecard
                    giftcard_brand_code: null
                    giftcard_brand_image: null
                    giftcard_amount: null
                    youtube_id: null
                    landing_page_url: null
                    settings: null
                    external_settings: null
                    share_uuid: 5J5N-QAD3-6LLL-LSZZ
                  - id: 116
                    user_id: 2
                    sub_account_id: null
                    handwriting_style_id: 1
                    font_size: null
                    font_color: null
                    realism: null
                    name: This is another test
                    content: |-
                      Dear %FIRST_NAME%

                      This is another test message.
                    additional_pages: null
                    skip_creative_generation: 0
                    custom_background_url: null
                    qrcode_url: null
                    cc_emails: []
                    created_at: '2018-11-10T23:10:52.000000Z'
                    updated_at: '2024-05-07T15:24:24.000000Z'
                    type: postcard
                    giftcard_brand_code: null
                    giftcard_brand_image: null
                    giftcard_amount: null
                    youtube_id: null
                    landing_page_url: null
                    settings: null
                    external_settings: null
                    share_uuid: QT74-5VK4-DJ38-M227
                links:
                  first: https://api.thanks.io/api/v2/message-templates?page=1
                  last: https://api.thanks.io/api/v2/message-templates?page=71
                  prev: null
                  next: https://api.thanks.io/api/v2/message-templates?page=2
                meta:
                  current_page: 1
                  from: 1
                  last_page: 71
                  path: https://api.thanks.io/api/v2/message-templates
                  per_page: '2'
                  to: 2
                  total: 141
        '403':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    items_per_page:
      name: items_per_page
      in: query
      description: Number of items to return per page.
      required: false
      schema:
        type: integer
        default: 25
      example: 5
    sub_account_id:
      name: sub_account_id
      in: query
      description: Filter results by Sub Account ID.
      required: false
      schema:
        type: integer
      example: 1
  schemas:
    message-template:
      type: object
      properties:
        id:
          type: integer
          example: 2
        user_id:
          type: integer
          example: 2
        sub_account_id:
          type:
            - integer
            - 'null'
        handwriting_style_id:
          type: integer
          description: ID of the handwriting style used in the message template
          example: 18
        font_size:
          type: integer
          description: Font size used in the message template.  Only valid for AI fonts
          enum:
            - auto
            - large
            - medium
            - small
        font_color:
          type: string
          description: Font color used in the message template.
          example: '#000000'
        realism:
          type: string
          description: Realism level used in the message template.  Only valid for AI fonts
        name:
          type: string
          example: Thank You Message
        content:
          type: string
          example: >-
            Hey %FIRST_NAME%!,


            THANK YOU for allowing us the opportunity to HELP you with your
            plan!
        additional_pages:
          type: string
          description: URL to additional PDFs to attach to cover letter of letters
        skip_creative_generation:
          type: integer
          description: >-
            Flag to skip creative generation.  Set when message template is PDF
            file only.
          example: 0
        custom_background_url:
          type: string
          description: URL of the custom background image for the message template
          example: https://example.com/background.png
        qrcode_url:
          type: string
          description: URL of the QR code image for the message template
          example: https://www.thanks.io
        cc_emails:
          type: array
          description: List of email addresses to be CC'd on when a QR code is scanned
          items:
            type: string
            format: email
        created_at:
          type: string
          format: date-time
          example: '2018-08-08T02:56:59.000000Z'
        updated_at:
          type: string
          format: date-time
          example: '2025-02-12T05:13:15.000000Z'
        type:
          type: string
          example: notecard
          enum:
            - postcard
            - letter
            - notecard
            - giftcard
            - windowlessletter
          description: Type of the message template
        giftcard_brand_code:
          type: string
          description: Brand code of the gift card
          example: amazonus
        giftcard_brand_image:
          type: string
          description: Image URL of the gift card brand
          example: https://d2md0c8rpvzmz5.cloudfront.net/giftcards/amazonus.png
        giftcard_amount:
          type: integer
          description: Amount of the gift card in cents
          example: 5000
        landing_page_url:
          type: string
          description: URL of the gated landing page
        share_uuid:
          type: string
          example: 5J5N-QAD3-6LLL-LSZZ
    links:
      type: object
      properties:
        first:
          type:
            - string
            - 'null'
          description: URL of the first page of results
        last:
          type:
            - string
            - 'null'
          description: URL of the last page of results
        prev:
          type:
            - string
            - 'null'
          description: URL of the previous page of results
        next:
          type:
            - string
            - 'null'
          description: URL of the next page of results
    meta:
      type: object
      properties:
        current_page:
          type: integer
          example: 1
          description: Current page number
        from:
          type:
            - integer
            - 'null'
          example: 1
          description: Index of the first item on the current page
        last_page:
          type: integer
          example: 1
          description: Total number of pages
        path:
          type: string
          description: Base URL for the resource
        per_page:
          type: integer
          example: 25
          description: Number of items per page
        to:
          type:
            - integer
            - 'null'
          example: 1
          description: Index of the last item on the current page
        total:
          type: integer
          example: 1
          description: Total number of items
  responses:
    Unauthorized:
      description: Access token is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your thanks.io API key

````