Thanks.io Message Templates API

The Message Templates API from Thanks.io — 2 operation(s) for message templates.

Operations 5

GET /message-templates/ List All #
POST /message-templates/ Create Message Template #
GET /message-templates/{messageTemplateId} Get Message Template #
PATCH /message-templates/{messageTemplateId} Update Message Template #
DELETE /message-templates/{messageTemplateId} Delete Message Template #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/thanks-io:thanks-io-message-templates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

thanks-io-message-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: thanks.io Message Templates API
  description: Use the thanks.io API to send postcards, letters, notecards, windowless letters, and gift cards.
  contact:
    url: https://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: Message Templates
paths:
  /message-templates/:
    get:
      tags:
      - Message Templates
      operationId: getMessageTemplates
      summary: List All
      description: List all available message templates.
      parameters:
      - $ref: '#/components/parameters/items_per_page'
      - $ref: '#/components/parameters/sub_account_id'
      - name: type
        in: query
        schema:
          type: string
          enum:
          - postcard
          - postcard6x9
          - postcard6x11
          - letter
          - windowlessletter
          - notecard
          - giftcard
          - magnacard
        description: Only return templates of this type. `postcard` is 4x6.
      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: 1912
                  user_id: 2
                  sub_account_id: null
                  handwriting_style_id: 102
                  font_size: small
                  font_color: '#000000'
                  name: Thank You Message Templates
                  content: Dear %FIRST_NAME%\n\nThis is another test message.
                  additional_pages: null
                  skip_creative_generation: 0
                  custom_background_url: null
                  qrcode_url: https://www.google.com
                  cc_emails: []
                  created_at: '2026-08-05T02:38:44.000000Z'
                  updated_at: '2026-08-05T02:39:04.000000Z'
                  type: postcard
                  giftcard_brand_code: ''
                  giftcard_brand_image: null
                  giftcard_amount: ''
                  youtube_id: ''
                  landing_page_url: ''
                  share_uuid: TL9C-UUBP-SNT2-SX5Q
                  brand_data:
                    brand_code: amazonus
                    title: Amazon.com
                    image: https://cdn.thanks.io/giftcards/amazonus.png
                    available_amounts:
                    - 500
                    - 1000
                    - 1500
                    - 2000
                    - 2500
                    - 3000
                    - 4000
                    - 5000
                    - 10000
                    - 20000
                  handwriting_realism: false
                - id: 1913
                  user_id: 2
                  sub_account_id: null
                  handwriting_style_id: 110
                  font_size: auto
                  font_color: rgba(31,0,113,0.80)
                  name: Birthday Card
                  content: "Hey %FIRST_NAME%!, \n\nTHANK YOU for allowing us the opportunity to HELP you with your plan!  \n\nHappy Birthday!"
                  additional_pages: null
                  skip_creative_generation: 0
                  custom_background_url: null
                  qrcode_url: ''
                  cc_emails: []
                  created_at: '2026-08-05T02:41:28.000000Z'
                  updated_at: '2026-08-05T02:41:32.000000Z'
                  type: giftcard
                  giftcard_brand_code: starbucksus
                  giftcard_brand_image: https://cdn.thanks.io/giftcards/starbucks.png
                  giftcard_amount: '2000'
                  youtube_id: ''
                  landing_page_url: ''
                  share_uuid: PKE4-QGHH-CHZ9-QV6G
                  brand_data:
                    brand_code: starbucksus
                    title: Starbucks
                    image: https://cdn.thanks.io/giftcards/starbucks.png
                    available_amounts:
                    - 500
                    - 1000
                    - 1500
                    - 2000
                    - 2500
                    - 5000
                    - 10000
                  handwriting_realism: false
                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'
    post:
      tags:
      - Message Templates
      operationId: createMessageTemplate
      summary: Create Message Template
      description: Create a message template for the authenticated user using the public v2 request shape.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/message-template-create'
            example:
              name: Thank You Message
              type: postcard
              content: 'Hey %FIRST_NAME%!,


                THANK YOU for allowing us the opportunity to HELP you with your plan!'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/message-template'
              example:
                id: 1912
                user_id: 2
                sub_account_id: null
                handwriting_style_id: 102
                font_size: small
                font_color: '#000000'
                name: Thank You Message Templates
                content: Dear %FIRST_NAME%\n\nThis is another test message.
                additional_pages: null
                skip_creative_generation: 0
                custom_background_url: null
                qrcode_url: https://www.google.com
                cc_emails: []
                created_at: '2026-08-05T02:38:44.000000Z'
                updated_at: '2026-08-05T02:39:04.000000Z'
                type: postcard
                giftcard_brand_code: ''
                giftcard_brand_image: null
                giftcard_amount: ''
                youtube_id: ''
                landing_page_url: ''
                share_uuid: TL9C-UUBP-SNT2-SX5Q
                brand_data:
                  brand_code: amazonus
                  title: Amazon.com
                  image: https://cdn.thanks.io/giftcards/amazonus.png
                  available_amounts:
                  - 500
                  - 1000
                  - 1500
                  - 2000
                  - 2500
                  - 3000
                  - 4000
                  - 5000
                  - 10000
                  - 20000
                handwriting_realism: false
        '403':
          $ref: '#/components/responses/Unauthorized'
  /message-templates/{messageTemplateId}:
    parameters:
    - name: messageTemplateId
      in: path
      description: ID of the message template
      required: true
      schema:
        type: integer
        example: 2
    get:
      tags:
      - Message Templates
      operationId: getMessageTemplate
      summary: Get Message Template
      description: Fetch a single message template by ID.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/message-template'
              example:
                id: 1912
                user_id: 2
                sub_account_id: null
                handwriting_style_id: 102
                font_size: small
                font_color: '#000000'
                name: Thank You Message Templates
                content: Dear %FIRST_NAME%\n\nThis is another test message.
                additional_pages: null
                skip_creative_generation: 0
                custom_background_url: null
                qrcode_url: https://www.google.com
                cc_emails: []
                created_at: '2026-08-05T02:38:44.000000Z'
                updated_at: '2026-08-05T02:39:04.000000Z'
                type: postcard
                giftcard_brand_code: ''
                giftcard_brand_image: null
                giftcard_amount: ''
                youtube_id: ''
                landing_page_url: ''
                share_uuid: TL9C-UUBP-SNT2-SX5Q
                brand_data:
                  brand_code: amazonus
                  title: Amazon.com
                  image: https://cdn.thanks.io/giftcards/amazonus.png
                  available_amounts:
                  - 500
                  - 1000
                  - 1500
                  - 2000
                  - 2500
                  - 3000
                  - 4000
                  - 5000
                  - 10000
                  - 20000
                handwriting_realism: false
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
      - Message Templates
      operationId: updateMessageTemplate
      summary: Update Message Template
      description: Update a message template using the public v2 request shape.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/message-template-update'
            example:
              content: Updated message body
              additional_pages: https://example.com/additional-pages.pdf
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/message-template'
              example:
                id: 1913
                user_id: 2
                sub_account_id: null
                handwriting_style_id: 110
                font_size: auto
                font_color: rgba(31,0,113,0.80)
                name: Birthday Card
                content: "Hey %FIRST_NAME%!, \n\nTHANK YOU for allowing us the opportunity to HELP you with your plan!  \n\nHappy Birthday!"
                additional_pages: null
                skip_creative_generation: 0
                custom_background_url: null
                qrcode_url: ''
                cc_emails: []
                created_at: '2026-08-05T02:41:28.000000Z'
                updated_at: '2026-08-05T02:41:32.000000Z'
                type: giftcard
                giftcard_brand_code: starbucksus
                giftcard_brand_image: https://cdn.thanks.io/giftcards/starbucks.png
                giftcard_amount: '2000'
                youtube_id: ''
                landing_page_url: ''
                share_uuid: PKE4-QGHH-CHZ9-QV6G
                brand_data:
                  brand_code: starbucksus
                  title: Starbucks
                  image: https://cdn.thanks.io/giftcards/starbucks.png
                  available_amounts:
                  - 500
                  - 1000
                  - 1500
                  - 2000
                  - 2500
                  - 5000
                  - 10000
                handwriting_realism: false
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      tags:
      - Message Templates
      operationId: deleteMessageTemplate
      summary: Delete Message Template
      description: Delete a message template.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: success
              example:
                message: success
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Not Found
    Unauthorized:
      description: Access token is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthorized
  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'
        handwriting_realism:
          type: boolean
          description: Handwriting 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
          format: uri
          description: URL to additional pages to include with the cover letter. Only valid for letter templates.
        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. Only valid for postcard backs and the interior background of notecards and giftcards.
          example: https://example.com/background.png
        qrcode_url:
          type: string
          description: URL of the QR code image for the message template
          example: https://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
          - postcard6x9
          - postcard6x11
          - letter
          - windowlessletter
          - notecard
          - giftcard
          - magnacard
          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://cdn.thanks.io/giftcards/amazonus.png
        giftcard_amount:
          type: integer
          description: Amount of the gift card in cents
          example: 5000
        landing_page_url:
          type: string
          format: uri
          description: URL of the gated landing page (also known as a gating URL). Recipients must visit this page before they can redeem the gift card, letting you gate redemption behind an action such as booking a demo or completing a form. Only valid for giftcards.
        share_uuid:
          type: string
          example: 5J5N-QAD3-6LLL-LSZZ
    message-template-update:
      type: object
      properties:
        name:
          type: string
          description: Updated name of the message template
        handwriting_style_id:
          type: integer
          description: Handwriting style ID for the message template
          example: 4
        font_color:
          type: string
          description: Handwriting color to use
          example: rgba(31,0,113,0.80)
        handwriting_realism:
          type: boolean
          description: Set to true to enable the realism effect for AI fonts.
          example: true
        content:
          type: string
          description: Updated template body content
        type:
          type: string
          example: notecard
          enum:
          - postcard
          - postcard6x9
          - postcard6x11
          - letter
          - windowlessletter
          - notecard
          - giftcard
          - magnacard
          description: Type of the message template
        sub_account_id:
          type:
          - integer
          - 'null'
          description: ID of the sub-account to associate with this template.
        additional_pages:
          type: string
          format: uri
          description: Updated additional PDF URL for the template
        pdf_only_url:
          type: string
          format: uri
          description: URL to PDF file to use for entire mailer. If this is specified, no cover letter is generated.  Valid for letter templates only. Providing this URL automatically sets skip_creative_generation to true. For windowed letter templates, leave the upper-left address area of page 1 blank and do not include a recipient address in the PDF; thanks.io prints each recipient's address there.
        custom_background_url:
          type: string
          format: uri
          description: Updated custom background image URL. Only valid for postcard backs and the interior background of notecards and giftcards.
        qrcode_url:
          type: string
          format: uri
          description: Updated QR code image URL
        cc_emails:
          type: array
          items:
            type: string
            format: email
        giftcard_brand_code:
          type: string
          description: Updated gift card brand code. Required when type is giftcard.
        giftcard_amount:
          type: integer
          description: Updated gift card amount in cents. Required when type is giftcard.
        landing_page_url:
          type: string
          format: uri
          description: Updated gated landing page URL (also known as a gating URL). Recipients must visit this page before they can redeem the gift card, letting you gate redemption behind an action such as booking a demo or completing a form. Only valid for giftcards.
    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
    message-template-create:
      type: object
      properties:
        type:
          type: string
          example: notecard
          enum:
          - postcard
          - postcard6x9
          - postcard6x11
          - letter
          - windowlessletter
          - notecard
          - giftcard
          - magnacard
          description: Type of the message template
        name:
          type: string
          description: Name of the message template
          example: Thank You Message
        handwriting_style_id:
          type: integer
          description: Handwriting style ID for the message template
          example: 4
        font_color:
          type: string
          description: Handwriting color to use
          example: rgba(31,0,113,0.80)
        handwriting_realism:
          type: boolean
          description: Set to true to enable the realism effect for AI fonts.
          example: true
        content:
          type: string
          description: Template body content.
          example: 'Hey %FIRST_NAME%!,


            THANK YOU for allowing us the opportunity to HELP you with your plan!'
        sub_account_id:
          type:
          - integer
          - 'null'
          description: ID of the sub-account to associate with this template.
          example: 7
        additional_pages:
          type: string
          format: uri
          description: URL to additional pages to include with the cover letter. Only valid for letter templates.
          example: https://example.com/additional-pages.pdf
        pdf_only_url:
          type: string
          format: uri
          description: URL to PDF file to use for entire mailer. If this is specified, no cover letter is generated.  Valid for letter templates only. Providing this URL automatically sets skip_creative_generation to true. For windowed letter templates, leave the upper-left address area of page 1 blank and do not include a recipient address in the PDF; thanks.io prints each recipient's address there.
          example: https://example.com/mailer.pdf
        custom_background_url:
          type: string
          format: uri
          description: URL of a custom background image for the template. Only valid for postcard backs and the interior background of notecards and giftcards.
          example: https://example.com/background.png
        qrcode_url:
          type: string
          format: uri
          description: URL of the QR code image to use for the template.
          example: https://thanks.io
        cc_emails:
          type: array
          description: List of email addresses to CC when a QR code is scanned
          items:
            type: string
            format: email
        giftcard_brand_code:
          type: string
          description: Brand code of the gift card. Required when type is giftcard.
          example: amazonus
        giftcard_amount:
          type: integer
          description: Amount of the gift card in cents. Required when type is giftcard. Use this field for public v2 requests instead of giftcard_amount_in_cents.
          example: 5000
        landing_page_url:
          type: string
          format: uri
          description: URL of the gated landing page (also known as a gating URL). Recipients must visit this page before they can redeem the gift card, letting you gate redemption behind an action such as booking a demo or completing a form. Only valid for giftcards.
          example: https://example.com/landing
      allOf:
      - if:
          properties:
            type:
              const: giftcard
          required:
          - type
        then:
          required:
          - giftcard_brand_code
          - giftcard_amount
    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
  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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your thanks.io API key
externalDocs:
  description: Learn more about thanks.io
  url: https://docs.thanks.io
x-mint:
  mcp:
    enabled: true
x-mcp:
  enabled: true