Tamio

Add a subscriber to a mailing list

POST https://api.tamio.com/v2/mailing-lists/add-subscriber/{uuid}

Adds a subscriber to the specified mailing list. If the subscriber does not exist, a new subscriber and associated lead record are created. If the subscriber already exists, they are associated with the list without duplication.

Path Parameters

uuid string*

UUID of the mailing list to add the subscriber to

Body Parameters

email string*

Subscriber's email address

first_name string*

Subscriber's first name

last_name string

Subscriber's last name

Responses

200 Subscriber added to mailing list successfully

Subscriber added to mailing list successfully

status integer
mailing_list MailingList
400 Validation or business-logic error.
401 Missing or invalid API key
/mailing-lists/add-subscriber/{uuid}
1const response = await fetch("https://api.tamio.com/v2/mailing-lists/add-subscriber/{uuid}", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 "email": "[email protected]",
9 "first_name": "John",
10 "last_name": "Doe"
11 })
12});
13const data = await response.json();
Responses
{
  "status": 200,
  "mailing_list": {
    "id": "00000000-0000-0000-0000-000000000000",
    "object": "mailing_list",
    "label": "VIP Customers",
    "created_at": 1700000000,
    "number_of_subscribers": 245,
    "number_of_newsletters": 12,
    "audience": {},
    "last_campaign_date": 1704153600
  }
}