Message Templates

Create Message Template

Changed on

Create a message template for the authenticated user using the public v2 request shape.

post/message-templates/

Request

  • Base URL: https://api.thanks.io/api/v2
  • URL: https://api.thanks.io/api/v2/message-templates/
  • Auth: HTTP bearer

Request body

type'postcard' | 'postcard6x9' | 'postcard6x11' | 'letter' | 'windowlessletter' | 'notecard' | 'giftcard' | 'magnacard'

Type of the message template

namestring

Name of the message template

handwriting_style_idinteger

Handwriting style ID for the message template

font_colorstring

Handwriting color to use

handwriting_realismboolean

Set to true to enable the realism effect for AI fonts.

contentstring

Template body content.

sub_account_idinteger nullable

ID of the sub-account to associate with this template.

additional_pagesstring uri

URL to additional pages to include with the cover letter. Only valid for letter templates.

pdf_only_urlstring uri

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_urlstring uri

URL of a custom background image for the template. Only valid for postcard backs and the interior background of notecards and giftcards.

qrcode_urlstring uri

URL of the QR code image to use for the template.

cc_emailsstring[]

List of email addresses to CC when a QR code is scanned

giftcard_brand_codestring

Brand code of the gift card. Required when type is giftcard.

giftcard_amountinteger

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.

landing_page_urlstring uri

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 request

{
  "type": "notecard",
  "name": "Thank You Message",
  "handwriting_style_id": 4,
  "font_color": "rgba(31,0,113,0.80)",
  "handwriting_realism": true,
  "content": "Hey %FIRST_NAME%!,\n\nTHANK YOU for allowing us the opportunity to HELP you with your plan!",
  "sub_account_id": 7,
  "additional_pages": "https://example.com/additional-pages.pdf",
  "pdf_only_url": "https://example.com/mailer.pdf",
  "custom_background_url": "https://example.com/background.png",
  "qrcode_url": "https://thanks.io",
  "giftcard_brand_code": "amazonus",
  "giftcard_amount": 5000,
  "landing_page_url": "https://example.com/landing"
}

Response

Created

idinteger
user_idinteger
sub_account_idinteger nullable
handwriting_style_idinteger

ID of the handwriting style used in the message template

font_sizeinteger

Font size used in the message template. Only valid for AI fonts

font_colorstring

Font color used in the message template.

handwriting_realismboolean

Handwriting realism level used in the message template. Only valid for AI fonts

namestring
contentstring
additional_pagesstring uri

URL to additional pages to include with the cover letter. Only valid for letter templates.

skip_creative_generationinteger

Flag to skip creative generation. Set when message template is PDF file only.

custom_background_urlstring

URL of the custom background image for the message template. Only valid for postcard backs and the interior background of notecards and giftcards.

qrcode_urlstring

URL of the QR code image for the message template

cc_emailsstring[]

List of email addresses to be CC'd on when a QR code is scanned

created_atstring date-time
updated_atstring date-time
type'postcard' | 'postcard6x9' | 'postcard6x11' | 'letter' | 'windowlessletter' | 'notecard' | 'giftcard' | 'magnacard'

Type of the message template

giftcard_brand_codestring

Brand code of the gift card

giftcard_brand_imagestring

Image URL of the gift card brand

giftcard_amountinteger

Amount of the gift card in cents

landing_page_urlstring uri

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_uuidstring

Example response

{
  "id": 2,
  "user_id": 2,
  "handwriting_style_id": 18,
  "font_color": "#000000",
  "name": "Thank You Message",
  "content": "Hey %FIRST_NAME%!,\n\nTHANK YOU for allowing us the opportunity to HELP you with your plan!",
  "custom_background_url": "https://example.com/background.png",
  "qrcode_url": "https://thanks.io",
  "created_at": "2018-08-08T02:56:59.000000Z",
  "updated_at": "2025-02-12T05:13:15.000000Z",
  "type": "notecard",
  "giftcard_brand_code": "amazonus",
  "giftcard_brand_image": "https://cdn.thanks.io/giftcards/amazonus.png",
  "giftcard_amount": 5000,
  "share_uuid": "5J5N-QAD3-6LLL-LSZZ"
}

Changes