Tamio

Add a customer to a mailing list

POST https://api.tamio.com/v2/customers/add-to-list/{uuid}

Adds a single customer to a mailing list. A subscriber record is automatically created if one does not exist for the customer's email.

Path Parameters

uuid string*

UUID of the customer

Body Parameters

mailing_list string*

UUID of the mailing list

Example
{
  "mailing_list": "880e8400-e29b-41d4-a716-446655440000"
}

Responses

200 Customer added to mailing list

Customer added to mailing list

status integer
customers array of string
400 Validation or business-logic error.
401 Unauthorized – invalid or missing Bearer token
/customers/add-to-list/{uuid}
1const response = await fetch("https://api.tamio.com/v2/customers/add-to-list/{uuid}", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 "mailing_list": "880e8400-e29b-41d4-a716-446655440000"
9 })
10});
11const data = await response.json();
Responses
{
  "status": 200,
  "customers": []
}