Skip to main content
POST
Estimate Windowed Letter

Authorizations

Authorization
string
header
required

Bearer token authentication using your thanks.io API key

Body

application/json
preview
boolean

Set to true to return a preview instead of sending the mail piece. You can use this with any send call to inspect the output before submitting the order.

Example:

true

mailing_list_ids
integer[]

Mailing list IDs to send to. Required if recipients and radius_search are not provided.

Example:
recipients
(Create Recipient by Address · object | Create Recipient by Email · object)[]

Recipients to send to. Required if mailing_list_ids and radius_search are not provided.

Create a recipient by providing address details

Use a radius search to find recipients near an address. Required if mailing_list_ids and recipients are not provided. Lookup fees are $0.05 per record.

handwriting_style_id
integer

ID of handwriting style to use.

Example:

4

handwriting_color
enum<string>

Handwriting color to use. Options are preset named colors or specified as hex format, such as '#4287f5'

Available options:
blue,
black,
green,
purple,
red
Examples:

"blue"

"#4287f5"

handwriting_realism
boolean

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

Example:

true

sub_account
integer

Sub-account ID to use for this order.

Example:

7

notification_emails
string

Optional comma-separated list of email addresses to notify about order events such as QR scan notifications.

Example:

"ops@example.com,sales@example.com"

send_standard_mail
boolean
default:false

Set to true to use Standard Mail postage. If false or omitted, account default is used.

return_name
string

Custom return name for the order.

Example:

"Custom Return"

return_address
string

Custom return address for the order.

Example:

"1 Main Street"

return_address2
string

Custom return address line 2 for the order.

Example:

"Unit 1"

return_city
string

Custom return city for the order.

Example:

"Woodbridge"

return_state
string

Custom return state/province for the order.

Example:

"NJ"

return_postal_code
string

Custom return postal code for the order.

Example:

"07095"

metadata
object | null

Your own key/value data to store with the order. It is returned unchanged by the order endpoints and included in every webhook event for the order as order.metadata. Must be a JSON object rather than an array, and no larger than 8,192 bytes once encoded as JSON. thanks.io does not print or otherwise act on these values.

Example:
image_template_id
integer

ID of image template to use for the background of the cover letter. If neither image_template_id nor front_image_url is specified, a blank background will be used.

Example:

6

front_image_url
string

URL to image to use for the background of the cover letter. If neither image_template_id nor front_image_url is specified, a blank background will be used.

Example:

"https://cdn.thanks.io/letter-backgrounds/bg0.png"

message
string

Handwritten message content used for cover letter.

Example:

"Hey %FIRST_NAME%!,\n\nTHANK YOU for allowing us the opportunity to HELP you with your plan!"

message_template_id
integer

ID of message template to use for cover letter.

Example:

12

qrcode_url
string

URL to Autogenerate QR Code on cover letter.

Example:

"https://www.google.com"

additional_pages_url
string

URL to additional pages to include with the cover letter.

Example:

"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"

pdf_only_url
string

URL to PDF file to use for entire mailer. If this is specified, no cover letter is generated. Do not include the recipient's address in your PDF: thanks.io prints each recipient's name and address in the upper-left area of page 1, where it shows through the envelope window. Leave that area blank; an address already in the PDF is printed over.

Example:

"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"

Response

The order was priced. Nothing was charged and no order was created.

message
string
Example:

"OK"

data
object