Create a mailing list

POST https://api.tamio.com/v2/mailing-lists/create

Creates a new mailing list with the given label. The label must be unique within the account.

Body Parameters

label string*

Name of the mailing list

Responses

200 Mailing list created successfully

Mailing list created successfully

status integer
mailing_list MailingList
400 Bad request. Possible `error_code` values:
401 Missing or invalid API key
/mailing-lists/create
1const response = await fetch("https://api.tamio.com/v2/mailing-lists/create", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 // ... request body
9 })
10});
11const data = await response.json();
Responses
{
  "status": 200,
  "mailing_list": {
    "id": "string",
    "object": "mailing_list",
    "label": "VIP Customers",
    "created_at": 1700000000,
    "number_of_subscribers": 245,
    "number_of_newsletters": 12,
    "audience": {},
    "last_campaign_date": 1704153600
  }
}