MailLandDocs

Lists

Organize subscribers into mailing lists for targeted campaigns

Mailing lists let you organize subscribers into groups for targeted campaigns. Each subscriber record belongs to one list, but the same email address can have separate records in several lists, and campaigns can target a specific list or segment within a list.

Create a List

POST https://api.mail.land/v1/marketing/lists
Create list request
{
  "name": "Product Updates",
  "description": "Subscribers interested in product announcements"
}
FieldTypeRequiredDescription
namestringYesList name (must be unique per workspace)
descriptionstringNoList description
Create a mailing list
curl -X POST https://api.mail.land/v1/marketing/lists \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{ "name": "Product Updates", "description": "Product announcements" }'

Response

List response
{
  "id": "vtmlew96u277jq",
  "name": "Product Updates",
  "description": "Product announcements",
  "isActive": true,
  "subscriberCount": 0,
  "createdAt": "2026-02-17T12:00:00Z",
  "updatedAt": "2026-02-17T12:00:00Z"
}

List All Mailing Lists

GET https://api.mail.land/v1/marketing/lists
ParameterTypeDefaultDescription
cursorstring-Opaque cursor from the previous page's nextCursor. Omit for the first page.
limitint20Items per page
searchstring-Search by name
isActivebool-Filter by active status
sortBystring-Sort field
sortDescboolfalseSort descending
List all mailing lists
curl "https://api.mail.land/v1/marketing/lists?limit=20" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
List response
{
  "items": [
    {
      "id": "vtmlew96u277jq",
      "name": "Product Updates",
      "description": "Product announcements",
      "isActive": true,
      "subscriberCount": 2500,
      "createdAt": "2026-01-10T08:00:00Z",
      "updatedAt": "2026-02-17T12:00:00Z"
    }
  ],
  "nextCursor": "eyJ2IjoxLCJzIjoiY3JlYXRlZGF0OmRlc2MiLCJrIjoi...",
  "hasMore": true
}

Get List Details

GET https://api.mail.land/v1/marketing/lists/{id}

Returns extended details including subscriber breakdown:

Get list details
curl https://api.mail.land/v1/marketing/lists/vtmlew96u277jq \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
List detail response
{
  "id": "vtmlew96u277jq",
  "name": "Product Updates",
  "description": "Product announcements",
  "isActive": true,
  "subscriberCount": 2500,
  "activeSubscribers": 2300,
  "unsubscribedCount": 150,
  "bouncedCount": 50,
  "createdAt": "2026-01-10T08:00:00Z",
  "updatedAt": "2026-02-17T12:00:00Z"
}

Update a List

PUT https://api.mail.land/v1/marketing/lists/{id}
Update list request
{
  "name": "Product Announcements",
  "description": "Updated description",
  "isActive": true
}
FieldTypeRequiredDescription
namestringYesList name (must be unique)
descriptionstringNoList description
isActiveboolNoActive status (default: true)

isActive is a label only: setting it to false does not block sending. Nothing in the campaign or worker code reads it to prevent a campaign from targeting this list.

Update a mailing list
curl -X PUT https://api.mail.land/v1/marketing/lists/vtmlew96u277jq \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Announcements",
    "description": "Updated description",
    "isActive": true
  }'

Delete a List

DELETE https://api.mail.land/v1/marketing/lists/{id}

Deletes the mailing list. Subscribers in this list are not deleted but their mailingListId is cleared (a SetNull foreign key). List-scoped unsubscribes are preserved when a list is deleted.

If a subscriber in this list already has a contact with no list (for example because they were in another list that was deleted earlier), that contact is kept, and their membership of this list is kept only as history: it no longer appears in contacts, and no campaign or automation targets it. Its unsubscribes, consent records and campaign history are preserved.

Delete a mailing list
curl -X DELETE https://api.mail.land/v1/marketing/lists/vtmlew96u277jq \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

Error Responses

StatusCodeDescription
400VALIDATION_FAILEDName is required
400INVALID_REQUESTA mailing list with this name already exists
403FORBIDDENInsufficient permissions
404RESOURCE_NOT_FOUNDMailing list not found

Next Steps

On this page