Skip to main content
The audience API manages everything campaigns send to: contact lists, the contacts themselves, subscription topics, custom properties, and dynamic segments. Everything is reached through Lettr::audience():
All list() endpoints are paginated and return a response object exposing the data collection, a pagination object, and a hasMore() helper.

Contacts

A contact is an email address with optional custom properties, optionally attached to a list on creation.
Contact status is one of Subscribed, Unsubscribed, Bounced, Complained, or Unverified.

API Reference

GET /audience/contacts

Double opt-in

Pass a DoubleOptInConfig to create the contact as unverified and trigger a confirmation email — the contact becomes subscribed once they click the link.

Bulk operations & membership

Lists

A list is a static collection of contacts.

API Reference

GET /audience/lists

Segments

A segment is a dynamic group defined by conditions. Groups are joined by OR, and conditions within a group are joined by AND.
Operators that don’t take a value (SegmentOperator::IsTrue, SegmentOperator::IsFalse) report this via requiresValue().

API Reference

GET /audience/segments

Topics

Topics are subscription categories contacts can opt in or out of.

API Reference

GET /audience/topics

Properties

Custom contact properties have an immutable name (must match ^[a-z][a-z0-9_]*$) and an immutable type. Only the fallback value can be updated.

API Reference

GET /audience/properties

What’s Next

Campaigns

Send to your audience

API Reference

Full audience API reference