Cohorts API
Twilio Cohorts lets you define audience segments against your customer profiles. Write filter criteria that describe the profiles you want to target, save the definition as a cohort, and generate a snapshot whenever you need an up-to-date list of matching profiles.
Cohorts doesn't store your customer data. When you request a snapshot, it retrieves profiles from your connected Twilio Memory Store and materializes only those profiles that satisfy your criteria.
- Reusable definitions: Save filter criteria as a cohort and generate a new snapshot whenever you trigger an outreach campaign, compliance audit, or internal data sync.
- Trait- and address-based targeting: Filter on customer traits, such as account status or plan tier, and on address channels, such as email or phone number.
- Integration with other Twilio products: Reference a cohort or a snapshot from the Bulk Messaging API or Twilio Email API to send messages to the resulting audience.
- Define a cohort with filter criteria written in Common Expression Language (CEL).
- Generate a snapshot of the cohort. Twilio evaluates your criteria against your connected profile data and returns an Operation resource that you can poll for status.
- After the Operation completes, retrieve the matching profiles from the snapshot.
- Cohorts does not support scheduled or recurring snapshots. Generate a new snapshot each time you need current data.
- Cohorts does not enforce consent. Express any consent requirements directly in your filter criteria.
- Snapshot profile data expires after a configurable period (7 days by default, up to 30 days). Snapshot metadata remains available after profile data expires.
- Cohorts does not write traits or addresses back to your profile data source.
- Follow the getting started guide to define your first cohort.
- Review core concepts before you build.
- Read about writing filter criteria.