const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
mailing_list: 1,
name: 'Tobias First',
address: '987 Main Street',
address2: null,
city: 'LENEXA',
province: 'KS',
postal_code: '66216',
country: 'US',
dob: '04/23/1981',
anniversary: '04/23/2025',
custom1: null,
custom2: null,
email: 'testemail@thanks.io',
phone: '1234567890'
},
{mailing_list: 1, email: 'another-testemail@thanks.io', phone: '1234567890'}
])
};
fetch('https://api.thanks.io/api/v2/recipients-utils/create-multiple', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.thanks.io/api/v2/recipients-utils/create-multiple \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"mailing_list": 1,
"name": "Tobias First",
"address": "987 Main Street",
"address2": null,
"city": "LENEXA",
"province": "KS",
"postal_code": "66216",
"country": "US",
"dob": "04/23/1981",
"anniversary": "04/23/2025",
"custom1": null,
"custom2": null,
"email": "testemail@thanks.io",
"phone": "1234567890"
},
{
"mailing_list": 1,
"email": "another-testemail@thanks.io",
"phone": "1234567890"
}
]
'import requests
url = "https://api.thanks.io/api/v2/recipients-utils/create-multiple"
payload = [
{
"mailing_list": 1,
"name": "Tobias First",
"address": "987 Main Street",
"address2": None,
"city": "LENEXA",
"province": "KS",
"postal_code": "66216",
"country": "US",
"dob": "04/23/1981",
"anniversary": "04/23/2025",
"custom1": None,
"custom2": None,
"email": "testemail@thanks.io",
"phone": "1234567890"
},
{
"mailing_list": 1,
"email": "another-testemail@thanks.io",
"phone": "1234567890"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"province": "KS",
"city": "Lenexa",
"name": "Tobias First",
"company": null,
"dob": "04/23/1981",
"anniversary": "04/23/2025",
"country": "US",
"address": "987 Main Street",
"address2": "",
"email": "testemail@thanks.io",
"phone": "1234567890",
"custom1": null,
"custom2": null,
"postal_code": "66216"
},
{
"province": "KS",
"city": "Lenexa",
"name": "Tobias Second",
"company": null,
"dob": "04/23/1981",
"anniversary": "04/23/2025",
"country": "US",
"address": "654 Main Street",
"address2": "",
"email": "testemail@thanks.io",
"phone": "1234567890",
"custom1": null,
"custom2": null,
"postal_code": "66216",
"error": "This address is already on this mailing list."
}
]Create Multiple Recipients
Add multiple recipients at once using a JSON array of recipient objects. If a recipient does not include a valid mailing address but does include a valid email address, thanks.io can attempt to look up a street address for an additional fee.
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
mailing_list: 1,
name: 'Tobias First',
address: '987 Main Street',
address2: null,
city: 'LENEXA',
province: 'KS',
postal_code: '66216',
country: 'US',
dob: '04/23/1981',
anniversary: '04/23/2025',
custom1: null,
custom2: null,
email: 'testemail@thanks.io',
phone: '1234567890'
},
{mailing_list: 1, email: 'another-testemail@thanks.io', phone: '1234567890'}
])
};
fetch('https://api.thanks.io/api/v2/recipients-utils/create-multiple', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.thanks.io/api/v2/recipients-utils/create-multiple \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"mailing_list": 1,
"name": "Tobias First",
"address": "987 Main Street",
"address2": null,
"city": "LENEXA",
"province": "KS",
"postal_code": "66216",
"country": "US",
"dob": "04/23/1981",
"anniversary": "04/23/2025",
"custom1": null,
"custom2": null,
"email": "testemail@thanks.io",
"phone": "1234567890"
},
{
"mailing_list": 1,
"email": "another-testemail@thanks.io",
"phone": "1234567890"
}
]
'import requests
url = "https://api.thanks.io/api/v2/recipients-utils/create-multiple"
payload = [
{
"mailing_list": 1,
"name": "Tobias First",
"address": "987 Main Street",
"address2": None,
"city": "LENEXA",
"province": "KS",
"postal_code": "66216",
"country": "US",
"dob": "04/23/1981",
"anniversary": "04/23/2025",
"custom1": None,
"custom2": None,
"email": "testemail@thanks.io",
"phone": "1234567890"
},
{
"mailing_list": 1,
"email": "another-testemail@thanks.io",
"phone": "1234567890"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"province": "KS",
"city": "Lenexa",
"name": "Tobias First",
"company": null,
"dob": "04/23/1981",
"anniversary": "04/23/2025",
"country": "US",
"address": "987 Main Street",
"address2": "",
"email": "testemail@thanks.io",
"phone": "1234567890",
"custom1": null,
"custom2": null,
"postal_code": "66216"
},
{
"province": "KS",
"city": "Lenexa",
"name": "Tobias Second",
"company": null,
"dob": "04/23/1981",
"anniversary": "04/23/2025",
"country": "US",
"address": "654 Main Street",
"address2": "",
"email": "testemail@thanks.io",
"phone": "1234567890",
"custom1": null,
"custom2": null,
"postal_code": "66216",
"error": "This address is already on this mailing list."
}
]Authorizations
Bearer token authentication using your thanks.io API key
Body
- Create Recipient by Address
- Create Recipient by Email
Create a recipient by providing address details
1
"123 Main Street"
"Tobias Example"
"thanks.io"
"Apartment 1"
"Any Town"
State or Province
"KS"
"12345"
"US"
Date of Birth in ISO 8601 format (YYYY-MM-DD) or null if not set. If provided as MM/DD/YYYY in requests, it will be converted to ISO 8601 format.
"1981-04-23"
Can be used for house purchase anniversaries, move-in dates, or any recurring annual milestone. Anniversary date in ISO 8601 format (YYYY-MM-DD) or null if not set. If provided as MM/DD/YYYY in requests, it will be converted to ISO 8601 format.
"2025-07-21"
"tobias@example.com"
"+1 (555) 123-4567"
Custom field for additional information about the recipient
"Unique Info"
Custom field for additional information about the recipient
"For example a product code or customer ID"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
The property (absentee) address for this recipient, such as a house an absentee owner owns, as opposed to where they get mail. Give either the whole address here, or the street line here with absentee_city, absentee_province and absentee_postal_code. When set, the ~ABSENTEE_STREET~, ~ABSENTEE_FULL_ADDRESS~, ~FULL_ADDRESS~ and ~STREET_VIEW~ image template variables, and %ABSENTEE_STREET% in messages, use this address instead of the mailing address. The mailer is still delivered to address. Include the city, state and ZIP so Street View finds the right property. It is stored as custom1 = absentee and custom2 = the full address and is returned that way, so it cannot be combined with custom1 or custom2: a recipient that sets either one as well is rejected with a 400.
"742 Evergreen Terrace"
City of the absentee (property) address. Requires absentee_address.
"Springfield"
State or province of the absentee (property) address. Requires absentee_address.
"IL"
ZIP or postal code of the absentee (property) address. Requires absentee_address.
"62704"
[
{
"mailing_list": 1,
"name": "Tobias First",
"address": "987 Main Street",
"address2": null,
"city": "LENEXA",
"province": "KS",
"postal_code": "66216",
"country": "US",
"dob": "04/23/1981",
"anniversary": "04/23/2025",
"custom1": null,
"custom2": null,
"email": "testemail@thanks.io",
"phone": "1234567890"
},
{
"mailing_list": 1,
"email": "another-testemail@thanks.io",
"phone": "1234567890"
}
]
Response
OK
18113288
1
"Tobias Example"
"thanks.io"
"123 Main Street"
"Apartment 1"
"Any Town"
State or Province
"KS"
"12345"
"US"
Date of Birth in ISO 8601 format (YYYY-MM-DD) or null if not set. If provided as MM/DD/YYYY in requests, it will be converted to ISO 8601 format.
"1981-04-23"
Can be used for house purchase anniversaries, move-in dates, or any recurring annual milestone. Anniversary date in ISO 8601 format (YYYY-MM-DD) or null if not set. If provided as MM/DD/YYYY in requests, it will be converted to ISO 8601 format.
"2025-07-21"
"tobias@example.com"
"+1 (555) 123-4567"
Custom field for additional information about the recipient
"Unique Info"
Custom field for additional information about the recipient
"For example a product code or customer ID"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
Custom field for additional information about the recipient
"Any Extra Info"
The mailing list this recipient belongs to
Show child attributes
Show child attributes
"2025-06-27T14:57:11.000000Z"
"2025-06-27T14:57:11.000000Z"
Was this page helpful?