const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: 'Updated message body',
additional_pages: 'https://example.com/additional-pages.pdf'
})
};
fetch('https://api.thanks.io/api/v2/message-templates/{messageTemplateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.thanks.io/api/v2/message-templates/{messageTemplateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "Updated message body",
"additional_pages": "https://example.com/additional-pages.pdf"
}
'import requests
url = "https://api.thanks.io/api/v2/message-templates/{messageTemplateId}"
payload = {
"content": "Updated message body",
"additional_pages": "https://example.com/additional-pages.pdf"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"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
}{
"message": "Unauthorized"
}{
"message": "Not Found"
}Update Message Template
Update a message template using the public v2 request shape.
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: 'Updated message body',
additional_pages: 'https://example.com/additional-pages.pdf'
})
};
fetch('https://api.thanks.io/api/v2/message-templates/{messageTemplateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.thanks.io/api/v2/message-templates/{messageTemplateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "Updated message body",
"additional_pages": "https://example.com/additional-pages.pdf"
}
'import requests
url = "https://api.thanks.io/api/v2/message-templates/{messageTemplateId}"
payload = {
"content": "Updated message body",
"additional_pages": "https://example.com/additional-pages.pdf"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"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
}{
"message": "Unauthorized"
}{
"message": "Not Found"
}Authorizations
Bearer token authentication using your thanks.io API key
Path Parameters
ID of the message template
2
Body
Updated name of the message template
Handwriting style ID for the message template
4
Handwriting color to use
"rgba(31,0,113,0.80)"
Set to true to enable the realism effect for AI fonts.
true
Updated template body content
Type of the message template
postcard, postcard6x11, letter, windowlessletter, notecard, giftcard, magnacard "notecard"
ID of the sub-account to associate with this template.
Updated additional PDF URL for the template
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.
Updated custom background image URL. Only valid for postcard backs and the interior background of notecards and giftcards.
Updated QR code image URL
Updated gift card brand code. Required when type is giftcard.
Updated gift card amount in cents. Required when type is giftcard.
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.
Response
OK
2
2
ID of the handwriting style used in the message template
18
Font size used in the message template. Only valid for AI fonts
auto, large, medium, small Font color used in the message template.
"#000000"
Handwriting realism level used in the message template. Only valid for AI fonts
"Thank You Message"
"Hey %FIRST_NAME%!,\n\nTHANK YOU for allowing us the opportunity to HELP you with your plan!"
URL to additional pages to include with the cover letter. Only valid for letter templates.
Flag to skip creative generation. Set when message template is PDF file only.
0
URL of the custom background image for the message template. Only valid for postcard backs and the interior background of notecards and giftcards.
"https://example.com/background.png"
URL of the QR code image for the message template
"https://www.thanks.io"
List of email addresses to be CC'd on when a QR code is scanned
"2018-08-08T02:56:59.000000Z"
"2025-02-12T05:13:15.000000Z"
Type of the message template
postcard, postcard6x11, letter, windowlessletter, notecard, giftcard, magnacard "notecard"
Brand code of the gift card
"amazonus"
Image URL of the gift card brand
"https://cdn.thanks.io/giftcards/amazonus.png"
Amount of the gift card in cents
5000
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.
"5J5N-QAD3-6LLL-LSZZ"
Was this page helpful?