audience_id:
filter. See the for the full schema.
How it works
Each condition in a filter names a profilepath, an operator, and a value.
Audience operators
Console labels and their API values:Combining conditions
A filter is a group with anoperator and a filters array. Use AND so every condition must match, or OR so at least one must. A condition inside filters can be another group. That nests rules like “on the pro plan AND (admin OR owner)“:
How membership works
Courier pre-computes membership instead of evaluating every rule against every profile at send time. When a profile changes, Courier updates whether that user belongs to each audience. Changing an audience’s rules starts a rebuild of its membership list. At send time, Courier reads the stored membership. A rebuild of a large audience can take many minutes. A send during the rebuild reads a partially updated list. Wait for membership to settle before a large send. Check and spot-check .Scoping a send to a tenant
context.tenant_id on a send controls branding, preferences, and template variables for that tenant. It does not restrict which audience members receive the message. To send only to users in one tenant, add an inline filters array on the recipient. Use the MEMBER_OF operator with path: tenant_id:
Limits & behavior
MEMBER_OFis a send-time filter, not an audience rule. It is not one of the audience comparison operators. Use it inline on the recipient to scope a send by tenant.- Membership is materialized, so it can lag a rule change. A large audience rebuilds over minutes, and sends read the stored list. Wait for it to settle before a critical blast.
- Audiences are eventual, lists are exact. An audience member appears once the profile change propagates. A member is present the moment you add them.
FAQ
Why did a user not receive an audience send right after I changed the rules?
Why did a user not receive an audience send right after I changed the rules?
Membership is pre-computed and rebuilds after a rule change. For a large audience that takes many minutes. Sends during the rebuild read a partially updated list. Wait for membership to settle before sending.
Should I use an audience or a list?
Should I use an audience or a list?
Use an audience when membership follows from profile data and should update itself, like all pro-plan users. Use a when you decide membership by hand.
Can I nest AND and OR in one filter?
Can I nest AND and OR in one filter?
Any condition in a
filters array can be a group with its own operator and filters.