Skip to main content
POST
/
recipients-utils
/
create-multiple
Create Multiple Recipients
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',
      custom1: null,
      custom2: null,
      email: '[email protected]',
      phone: '1234567890'
    },
    {mailing_list: 1, email: '[email protected]', 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));
[
  {
    "province": "KS",
    "city": "Lenexa",
    "name": "Tobias First",
    "company": null,
    "dob": "04/23/1981",
    "country": "US",
    "address": "987 Main Street",
    "address2": "",
    "email": "[email protected]",
    "phone": "1234567890",
    "custom1": null,
    "custom2": null,
    "postal_code": "66216"
  },
  {
    "province": "KS",
    "city": "Lenexa",
    "name": "Tobias Second",
    "company": null,
    "dob": "04/23/1981",
    "country": "US",
    "address": "654 Main Street",
    "address2": "",
    "email": "[email protected]",
    "phone": "1234567890",
    "custom1": null,
    "custom2": null,
    "postal_code": "66216",
    "error": "This address is already on this mailing list."
  }
]

Authorizations

Authorization
string
header
required

Bearer token authentication using your thanks.io API key

Body

application/json

Create a recipient by providing address details

mailing_list_id
integer
required
Example:

1

address
string
required
Example:

"123 Main Street"

name
string
Example:

"Tobias Example"

company
string
Example:

"www.thanks.io"

address2
string
Example:

"Apartment 1"

city
string
Example:

"Any Town"

province
string

State or Province

Example:

"KS"

postal_code
string
Example:

"12345"

country
string
Example:

"US"

dob
string

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.

Example:

"1981-04-23"

email
string
phone
string
Example:

"+1 (555) 123-4567"

custom1
string

Custom field for additional information about the recipient

Example:

"Unique Info"

custom2
string

Custom field for additional information about the recipient

Example:

"For example a product code or customer ID"

custom3
string

Custom field for additional information about the recipient

Example:

"Any Extra Info"

custom4
string

Custom field for additional information about the recipient

Example:

"Any Extra Info"

Example:
[
{
"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",
"custom1": null,
"custom2": null,
"email": "[email protected]",
"phone": "1234567890"
},
{
"mailing_list": 1,
"email": "[email protected]",
"phone": "1234567890"
}
]

Response

200 - application/json

OK

id
integer
Example:

18113288

mailing_list_id
integer
Example:

1

name
string
Example:

"Tobias Example"

company
string
Example:

"www.thanks.io"

address
string
Example:

"123 Main Street"

address2
string
Example:

"Apartment 1"

city
string
Example:

"Any Town"

province
string

State or Province

Example:

"KS"

postal_code
string
Example:

"12345"

country
string
Example:

"US"

dob
string

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.

Example:

"1981-04-23"

email
string
phone
string
Example:

"+1 (555) 123-4567"

custom1
string

Custom field for additional information about the recipient

Example:

"Unique Info"

custom2
string

Custom field for additional information about the recipient

Example:

"For example a product code or customer ID"

custom3
string

Custom field for additional information about the recipient

Example:

"Any Extra Info"

custom4
string

Custom field for additional information about the recipient

Example:

"Any Extra Info"

mailing-list
object

The mailing list this recipient belongs to

created_at
string
Example:

"2025-06-27T14:57:11.000000Z"

updated_at
string
Example:

"2025-06-27T14:57:11.000000Z"