Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Cohorts API


Overview

overview page anchor

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.

  1. Define a cohort with filter criteria written in Common Expression Language (CEL)(link takes you to an external page).
  2. 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.
  3. 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.