Skip to main content
POST
/
mailing-lists
/
Create Mailing List
const url = 'https://api.thanks.io/api/v2/mailing-lists/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"description":"Birthday List","sub_account_id":7,"qrcode_url":"https://www.google.com"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "type": "manual",
  "description": "New Mailing List (Created via API 09/07/2024)",
  "sub_account_id": 7,
  "user_id": 2,
  "updated_at": "2024-09-07 02:10:32",
  "created_at": "1 second ago",
  "id": 610
}

Authorizations

Authorization
string
header
required

Bearer token authentication using your thanks.io API key

Body

application/json
description
string
required
Example:

"Birthday List"

sub_account_id
integer

ID of the sub-account to associate with this mailing list. If not provided, the mailing list will be associated with the main account.

Example:

7

qrcode_url
string

QR Code URL for the mailing list.

Example:

"https://www.google.com"

Response

Created

type
enum<string>
Available options:
csv,
manual,
map,
friends,
retarget,
leads,
zapier,
radius,
highlevel,
qrscans
Example:

"manual"

description
string
Example:

"New Mailing List (Created via API 09/07/2024)"

sub_account_id
integer | null
Example:

7

user_id
integer
Example:

2

updated_at
string
Example:

"2024-09-07 02:10:32"

created_at
string
Example:

"1 second ago"

id
integer
Example:

610