How it works
Each list has a dotted-namespacelist_id such as acme-corp.beta-testers. Target one on a send with list_id:
/lists/{list_id}/subscriptions endpoints add, replace, read, and remove members. subscribes one user.
List patterns
Becauselist_id is a dotted namespace, one pattern can target many lists at once. Set list_pattern on the recipient. * matches any single part. ** is a trailing wildcard:
pattern parameter.
Naming a list after an entity, such as document.doc_a1b2.watchers, turns this into per-entity subscriptions. walks that pattern end to end.
Valid ids and patterns
Alist_id holds up to six dot-separated segments. It can’t be empty, include *, #, or a space, start or end with a period, or hold two periods in a row.
A wildcard replaces one whole segment, never part of one, so every * follows a period. Courier rejects these patterns:
Scoping a list send to a tenant
context.tenant_id controls branding, preferences, and template variables. It does not restrict which list members receive the message. To send only to users in one tenant, add an inline filters array with the MEMBER_OF operator:
FAQ
Should I use a list or an audience?
Should I use a list or an audience?
Use a list when you pick members by hand and want membership exact, like beta testers or VIPs. Use an when membership follows from profile data and should update itself.
Can I send to several lists at once?
Can I send to several lists at once?
Use
list_pattern with * for a single part, or ** as a trailing wildcard, to match many list_ids in one send.