### Local MCP Server Setup
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/mcp-server.mdx
Install the thanksio MCP server locally using this command. This provides a ready-to-use documentation server.
```bash
npx mint-mcp add thanksio
```
--------------------------------
### Example Request with Bearer Token
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/authentication/bearer-token.mdx
A minimal example of an authenticated request using `curl` to send a postcard.
```APIDOC
## Example Request
### Description
This example demonstrates how to make an authenticated POST request to the send postcard endpoint using `curl`.
### Method
POST
### Endpoint
`https://api.thanks.io/api/v2/send/postcard`
### Headers
- **Content-Type** (string) - Required - `application/json`
- **Authorization** (string) - Required - `Bearer YOUR_API_KEY`
### Request Body
- **recipients** (array) - Required - An array of recipient objects, each with `name` and `address`.
- **message** (string) - Required - The message content for the postcard.
- **front_image_url** (string) - Required - The URL for the front image of the postcard.
### Request Example
```json
{
"recipients": [
{
"name": "John Doe",
"address": "123 Main Street, Any Town, NY 12345"
}
],
"message": "Hi %FIRST_NAME% - Thank you for your business!",
"front_image_url": "https://d2md0c8rpvzmz5.cloudfront.net/inspiration_templates/default10.png"
}
```
```
--------------------------------
### Example cURL Request
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/authentication/bearer-token.mdx
Send an authenticated POST request to the send postcard API endpoint using cURL.
```bash
curl -X POST "https://api.thanks.io/api/v2/send/postcard" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"recipients": [{
"name": "John Doe",
"address": "123 Main Street, Any Town, NY 12345"
}],
"message": "Hi %FIRST_NAME% - Thank you for your business!",
"front_image_url": "https://d2md0md0c8rpvzmz5.cloudfront.net/inspiration_templates/default10.png"
}'
```
--------------------------------
### Create Webhook
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/api-reference/endpoint/webhooks/create-webhook.mdx
Use this endpoint to create a new webhook. Webhooks are only available on paid subscriptions.
```APIDOC
## POST /webhooks
### Description
Creates a new webhook subscription.
### Method
POST
### Endpoint
/webhooks
### Request Body
(No request body details provided in the source)
### Response
(No response details provided in the source)
Webhooks are available on paid subscriptions only.
```
--------------------------------
### Order Status Change Webhook Payload
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/webhooks/available/order-status-change.mdx
This JSON payload represents an example of the data received when an order's status is updated. It includes event details and the new status of the order.
```json
{
"event_type": "order.status_update",
"event_id": "a8a59df0-516d-11f0-9ca2-31daad0e4f7f",
"data": {
"order.id": 42401,
"order.status": "Printing"
},
"timestamp": 1750819187,
"date_time": "2025-06-25 02:39:47"
}
```
--------------------------------
### List All Mailing Lists
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/workflows/campaign.mdx
Use this endpoint to retrieve a list of all available mailing lists. This is a prerequisite for selecting the correct list to add a recipient to.
```bash
curl -X GET "https://api.thanks.io/api/v2/mailing-lists/" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY"
```
--------------------------------
### Create Mailing List
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/api-reference/mailing-lists-usage.mdx
A mailing list can be created using the `create` endpoint.
```APIDOC
## POST /mailing-lists/create
### Description
Creates a new mailing list.
### Method
POST
### Endpoint
/mailing-lists/create
### Request Body
- **name** (string) - Required - The name of the mailing list.
- **description** (string) - Optional - A description for the mailing list.
```
--------------------------------
### Query Available Giftcard Brands and Amounts
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/workflows/giftcard-order.mdx
Use this endpoint to retrieve a list of supported gift card brands and their available denominations. Requires an API key for authentication.
```bash
curl -X GET "https://api.thanks.io/api/v2/giftcard-brands" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY"
```
--------------------------------
### List Webhooks
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/api-reference/endpoint/webhooks/list-all.mdx
Retrieves a list of all configured webhooks for the account. This feature is only available for users on a paid subscription.
```APIDOC
## GET /webhooks
### Description
Retrieves a list of all configured webhooks.
### Method
GET
### Endpoint
/webhooks
### Parameters
### Request Example
### Response
#### Success Response (200)
#### Response Example
```
--------------------------------
### Notecard Image Templates
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/notecards.mdx
Displays image templates for the outer front and interior of a notecard. Use these to preview or link to the image files.
```jsx
```
--------------------------------
### MCP Server Remote URL
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/mcp-server.mdx
Use this URL to configure your AI clients with direct access to the thanks.io API documentation.
```text
https://docs.thanks.io/mcp
```
--------------------------------
### Magnacard Front and Back PNG Templates
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/magnacards.mdx
Use these components to link to the front and back side PNG templates for Magnacards. Ensure the image dimensions are within the recommended upload size.
```jsx
```
--------------------------------
### Redirect User to Authorize Application
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/authentication/oauth.mdx
Redirect users to this endpoint to initiate the OAuth authorization flow. Ensure you replace YOUR_CLIENT_ID and YOUR_REDIRECT_URI with your actual values.
```http
GET https://dashboard.thanks.io/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI
```
--------------------------------
### Send Notecard
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/api-reference/send-mailer-usage.mdx
Use this endpoint to create a direct mail order for a notecard, offering a folded card experience with interior content.
```APIDOC
## POST /send/notecard
### Description
Creates a direct mail order for a notecard.
### Method
POST
### Endpoint
/send/notecard
```
--------------------------------
### Place a Postcard Order via API
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/workflows/postcard-order.mdx
Use this cURL command to send a POST request to the postcard order endpoint. Ensure you replace YOUR_API_KEY with your actual API key and customize the JSON payload with your desired image, message, and recipient details.
```bash
curl -X POST "https://api.thanks.io/api/v2/send/postcard" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"front_image_url": "https://s3.amazonaws.com/cdn.thanks.io/user_image_library/gFBaJJJWRp60op3ZOoK7UaO5I7zi33rdKQGgHylR.png",
"message": "Hey %FIRST_NAME%!,\n\nTHANK YOU for allowing us the opportunity to HELP you with your plan!",
"handwriting_style": 4,
"recipients": [
{
"name": "Current Resident",
"address": "123 Main Street",
"city": "Fake City",
"province": "NY",
"postal_code": "55555",
"country": "US",
"custom1": "Example Custom 1",
"custom2": "Example Custom 2",
"custom3": "Example Custom 3",
"custom4": "Example Custom 4"
},
{
"name": "Jane Doe",
"address": "456 Another St",
"city": "Fake City",
"province": "NY",
"postal_code": "55555",
"country": "US"
}
]
}'
```
--------------------------------
### Image Template for Cover Page
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/windowless-letters.mdx
Provides a link to a PNG image template for the cover page of a windowless letter. This image can be used as a background for handwritten messages.
```html
When a handwritten message is added the message and background will be printed together to create a cover page. Any additional PDFs provided will be printed front & back. When printing PDF Only letters all pages are printed front & back.
```
--------------------------------
### Send Gift Card
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/api-reference/send-mailer-usage.mdx
Use this endpoint to create a direct mail order that includes a gift card selection.
```APIDOC
## POST /send/giftcard
### Description
Creates a direct mail order that includes a gift card.
### Method
POST
### Endpoint
/send/giftcard
```
--------------------------------
### Query Available Giftcard Brands
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/workflows/giftcard-order.mdx
Retrieve a list of available giftcard brands and their supported amounts. This is the first step in ordering a giftcard.
```APIDOC
## GET /api/v2/giftcard-brands
### Description
Queries the available giftcard brands and their supported amounts.
### Method
GET
### Endpoint
/api/v2/giftcard-brands
### Parameters
#### Query Parameters
None
### Request Example
```bash
curl -X GET "https://api.thanks.io/api/v2/giftcard-brands" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY"
```
### Response
#### Success Response (200)
(Response schema not provided in source)
#### Response Example
(Response example not provided in source)
```
--------------------------------
### Send Windowless Letter
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/api-reference/send-mailer-usage.mdx
Use this endpoint to create a direct mail order for a windowless letter, which includes a cover letter with a windowless envelope.
```APIDOC
## POST /send/windowless-letter
### Description
Creates a direct mail order for a windowless letter.
### Method
POST
### Endpoint
/send/windowless-letter
```
--------------------------------
### Send Giftcard via API
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/workflows/giftcard-order.mdx
Send a gift card to a recipient with specified details including brand, amount, message, and recipient address. Ensure all required fields are correctly populated. The message supports basic templating like %FIRST_NAME%.
```bash
curl -X POST "https://api.thanks.io/api/v2/send/giftcard" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"giftcard_brand": "GIFT_CARD_BRAND_ID_FROM_PREVIOUS_STEP",
"giftcard_amount_in_cents": "GIFT_CARD_AMOUNT_IN_CENTS_FROM_PREVIOUS_STEP",
"front_image_url": "https://d2md0c8rpvzmz5.cloudfront.net/notecard-inspirations/note1.png",
"message": "Hey %FIRST_NAME%!,
THANK YOU for allowing us the opportunity to HELP you with your plan!",
"recipients": [
{
"name": "Jane Doe",
"address": "456 Another St",
"city": "Fake City",
"province": "NY",
"postal_code": "55555",
"country": "US"
}
]
}'
```
--------------------------------
### Send Windowless Letter with PDF URL
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/workflows/letter-pdf-order.mdx
Use this cURL command to send a windowless letter by providing a PDF URL and recipient details. Ensure you replace 'YOUR_API_KEY' with your actual API key.
```bash
curl -X POST "https://api.thanks.io/api/v2/send/windowlessletter" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"pdf_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"recipients": [
{
"name": "Current Resident",
"address": "123 Main Street",
"city": "Fake City",
"province": "NY",
"postal_code": "55555",
"country": "US",
"custom1": "Example Custom 1",
"custom2": "Example Custom 2",
"custom3": "Example Custom 3",
"custom4": "Example Custom 4"
},
{
"name": "Jane Doe",
"address": "456 Another St",
"city": "Fake City",
"province": "NY",
"postal_code": "55555",
"country": "US"
}
]
}'
```
--------------------------------
### Notecard PDF Template Link
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/notecards.mdx
Displays a link to the exterior notecard PDF template. This card is used to provide access to the PDF file.
```jsx
```
--------------------------------
### Send a Postcard Directly via API
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/quickstart.mdx
Submit a postcard order directly through the API with an inline recipient, message, and front image URL. Ensure API Testing Mode is enabled to avoid sending real mail during integration validation.
```bash
curl -X POST "https://api.thanks.io/api/v2/send/postcard" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"recipients": [{
"name": "John Doe",
"address": "123 Main Street, Any Town, NY 12345"
}],
"message": "Hi %FIRST_NAME% - Thank you for your business!",
"front_image_url": "https://d2md0c8rpvzmz5.cloudfront.net/inspiration_templates/default10.png"
}'
```
--------------------------------
### Authorization Header Format
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/authentication/bearer-token.mdx
Include your bearer token in the Authorization header with the 'Bearer' prefix.
```http
Authorization: Bearer YOUR_ACCESS_TOKEN
```
--------------------------------
### Add Recipient to Mailing List
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/workflows/campaign.mdx
Use this endpoint to add a new recipient to a specific mailing list. Ensure you have the correct `mailing_list_id` from a previous step.
```bash
curl -X POST "https://api.thanks.io/api/v2/recipients" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"name": "John Doe",
"address": "123 Main Street, Any Town, NY 12345",
"mailing_list_id": "MAILING_LIST_ID_FROM_PREVIOUS_STEP"
}'
```
--------------------------------
### Front Side PNG Template Link
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/6x11postcards.mdx
Provides a link to the PNG template for the front side of a 6x11 postcard. Use this for designing the visual content.
```jsx
```
--------------------------------
### Send Windowless Letter
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/workflows/letter-pdf-order.mdx
Submit an order for a windowless letter by providing a PDF URL and recipient details.
```APIDOC
## POST /api/v2/send/windowlessletter
### Description
Submit an order for a windowless letter by providing a PDF URL and recipient details.
### Method
POST
### Endpoint
https://api.thanks.io/api/v2/send/windowlessletter
### Parameters
#### Request Body
- **pdf_url** (string) - Required - The URL of the PDF to be sent.
- **recipients** (array) - Required - A list of recipient objects.
- **name** (string) - Required - The name of the recipient.
- **address** (string) - Required - The street address of the recipient.
- **city** (string) - Required - The city of the recipient.
- **province** (string) - Required - The state or province of the recipient.
- **postal_code** (string) - Required - The postal code of the recipient.
- **country** (string) - Required - The country of the recipient.
- **custom1** (string) - Optional - Custom field 1.
- **custom2** (string) - Optional - Custom field 2.
- **custom3** (string) - Optional - Custom field 3.
- **custom4** (string) - Optional - Custom field 4.
### Request Example
{
"pdf_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"recipients": [
{
"name": "Current Resident",
"address": "123 Main Street",
"city": "Fake City",
"province": "NY",
"postal_code": "55555",
"country": "US",
"custom1": "Example Custom 1",
"custom2": "Example Custom 2",
"custom3": "Example Custom 3",
"custom4": "Example Custom 4"
},
{
"name": "Jane Doe",
"address": "456 Another St",
"city": "Fake City",
"province": "NY",
"postal_code": "55555",
"country": "US"
}
]
}
### Response
#### Success Response (200)
(Response details not provided in source)
```
--------------------------------
### Send Postcard
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/api-reference/send-mailer-usage.mdx
Use this endpoint to create a direct mail order for a postcard, the most common direct-mail format for one-off sends.
```APIDOC
## POST /send/postcard
### Description
Creates a direct mail order for a postcard.
### Method
POST
### Endpoint
/send/postcard
```
--------------------------------
### Entire Postcard PDF Template
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/4x6postcards.mdx
Download the complete 4x6 postcard as a PDF template.
```jsx
```
--------------------------------
### Bearer Token Authentication Header
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/authentication/bearer-token.mdx
All API requests must be authenticated with a bearer token. Include the token in the `Authorization` header as `Bearer YOUR_ACCESS_TOKEN`.
```APIDOC
## Bearer Token Authentication
### Description
Include your bearer token in the `Authorization` header.
### Method
All HTTP Methods
### Header
- **Authorization** (string) - Required - `Bearer YOUR_ACCESS_TOKEN`
```
--------------------------------
### PDF Template for Entire Page
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/windowless-letters.mdx
Provides a link to a PDF template that covers the entire page for windowless letters. This template is suitable for printing PDF-only letters where all pages are printed front and back.
```html
When a handwritten message is added the message and background will be printed together to create a cover page. Any additional PDFs provided will be printed front & back. When printing PDF Only letters all pages are printed front & back.
```
--------------------------------
### Notecard Canva Templates Links
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/notecards.mdx
Provides external links to Canva templates for the front and interior of a notecard. These links direct users to the Canva dashboard.
```jsx
```
--------------------------------
### Front Side PNG Template
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/4x6postcards.mdx
Use this template to design the front side of your 4x6 postcard.
```jsx
```
--------------------------------
### Back (Address) Side PNG Template Link
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/6x11postcards.mdx
Provides a link to the PNG template for the back side of a 6x11 postcard, intended for address placement. Use this for designing the mailing side.
```jsx
```
--------------------------------
### Update Webhook
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/api-reference/endpoint/webhooks/update-webhook.mdx
Updates an existing webhook. Webhooks are only available on paid subscriptions.
```APIDOC
## PUT /webhooks/{webhookId}
### Description
Updates an existing webhook.
### Method
PUT
### Endpoint
/webhooks/{webhookId}
### Parameters
#### Path Parameters
- **webhookId** (string) - Required - The ID of the webhook to update.
Webhooks are available on paid subscriptions only.
```
--------------------------------
### Canva Front/Back Side Template
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/4x6postcards.mdx
Link to a template on Canva for designing both the front and back sides of your postcard.
```jsx
```
--------------------------------
### Place Postcard Order
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/workflows/postcard-order.mdx
This endpoint allows you to send postcards programmatically. You can customize the front image, message, handwriting style, and recipient details.
```APIDOC
## POST /api/v2/send/postcard
### Description
Allows users to send postcards programmatically by providing details such as image URL, message, handwriting style, and recipient information.
### Method
POST
### Endpoint
/api/v2/send/postcard
### Parameters
#### Request Body
- **front_image_url** (string) - Required - The URL of the image to be used on the front of the postcard.
- **message** (string) - Required - The message to be included on the postcard. Supports basic templating like %FIRST_NAME%.
- **handwriting_style** (integer) - Optional - An integer representing the desired handwriting style.
- **recipients** (array) - Required - A list of recipient objects, each containing address details.
- **name** (string) - Required - The name of the recipient.
- **address** (string) - Required - The street address.
- **city** (string) - Required - The city.
- **province** (string) - Required - The state or province.
- **postal_code** (string) - Required - The postal code.
- **country** (string) - Required - The country.
- **custom1** (string) - Optional - Custom field 1 for recipient data.
- **custom2** (string) - Optional - Custom field 2 for recipient data.
- **custom3** (string) - Optional - Custom field 3 for recipient data.
- **custom4** (string) - Optional - Custom field 4 for recipient data.
### Request Example
```json
{
"front_image_url": "https://s3.amazonaws.com/cdn.thanks.io/user_image_library/gFBaJJJWRp60op3ZOoK7UaO5I7zi33rdKQGgHylR.png",
"message": "Hey %FIRST_NAME%!,\n\nTHANK YOU for allowing us the opportunity to HELP you with your plan!",
"handwriting_style": 4,
"recipients": [
{
"name": "Current Resident",
"address": "123 Main Street",
"city": "Fake City",
"province": "NY",
"postal_code": "55555",
"country": "US",
"custom1": "Example Custom 1",
"custom2": "Example Custom 2",
"custom3": "Example Custom 3",
"custom4": "Example Custom 4"
},
{
"name": "Jane Doe",
"address": "456 Another St",
"city": "Fake City",
"province": "NY",
"postal_code": "55555",
"country": "US"
}
]
}
```
### Response
#### Success Response (200)
(Response details not provided in source text)
#### Response Example
(Response example not provided in source text)
```
--------------------------------
### Entire Postcard PDF Template Link
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/creatives/templates/6x11postcards.mdx
Provides a link to a PDF template for the entire 6x11 postcard. Use this for a ready-to-print or final design file.
```jsx
```
--------------------------------
### Send Windowed Letter
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/api-reference/send-mailer-usage.mdx
Use this endpoint to create a direct mail order for a windowed letter, which includes a cover letter with a windowed envelope.
```APIDOC
## POST /send/windowed-letter
### Description
Creates a direct mail order for a windowed letter.
### Method
POST
### Endpoint
/send/windowed-letter
```
--------------------------------
### Send Magnacard
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/api-reference/send-mailer-usage.mdx
Use this endpoint to create a direct mail order for a magnacard, a magnet-style direct mail format.
```APIDOC
## POST /send/magnacard
### Description
Creates a direct mail order for a magnacard.
### Method
POST
### Endpoint
/send/magnacard
```
--------------------------------
### Exchange Authorization Code for Tokens
Source: https://github.com/thanks-io/thanks.io-api-docs/blob/main/authentication/oauth.mdx
After user authorization, use the received authorization code to request an access token and refresh token. This POST request must include your client credentials and redirect URI.
```http
POST https://dashboard.thanks.io/oauth/token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&redirect_uri=YOUR_REDIRECT_URI&code=AUTHORIZATION_CODE
```