Create a mailing list

Create a mailing list with its own address.

Creates a list addressed by a single email — send to the list address and wemail expands it to every member.

POST /v3/lists

Body parameters

ParameterTypeRequiredDescription
addressstringRequiredThe list address, under one of your verified domains. Used as the key in the member endpoints. Must be unique within your account.
namestringRequiredDisplay name for the list (max 255 chars). HTML is stripped.
descriptionstringOptionalFree-form description (max 1000 chars) shown in the Console.

Responses

StatusDescription
201Created. The mailing-list object, including its generated id and address.
400Validation error — missing address/name, or a value that fails length limits.
401Missing or invalid API key.
409Conflict. A mailing list with this address already exists on your account — addresses are unique per account. Reuse the existing list or pick a different address.

Code examples

cURL
curl -X POST https://api.wemail.io/v3/lists \
  -H "Authorization: Bearer afn_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "address": "newsletter@yourdomain.com", "name": "Product Newsletter", "description": "Weekly product updates" }'
Node.js
const res = await fetch("https://api.wemail.io/v3/lists", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ "address": "newsletter@yourdomain.com", "name": "Product Newsletter", "description": "Weekly product updates" }),
});
const data = await res.json();
Python
import os, requests

r = requests.post(
    "https://api.wemail.io/v3/lists",
    headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
    json={ "address": "newsletter@yourdomain.com", "name": "Product Newsletter", "description": "Weekly product updates" },
)
data = r.json()