List Cohorts
Retrieve a list of all cohorts (user segments) in your project. Supports filtering by type, creator, and search term.Endpoint
Path Parameters
The ID of the project to retrieve cohorts from
Query Parameters
Filter cohorts by type:
static- Only static cohorts (fixed membership)dynamic- Only dynamic cohorts (auto-updating)
Filter cohorts created by a specific user ID
Search cohorts by name (case-insensitive partial match)
If true, exclude cohorts with behavioral filters (useful for feature flag selection)
Maximum number of results to return
Number of results to skip (for pagination)
Response Fields
Array of cohort objects
Unique identifier for the cohort
Name of the cohort
Description of the cohort
Filter criteria defining cohort membership
Whether this cohort is static (true) or dynamic (false)
Current number of users in the cohort
Whether the cohort is currently being recalculated
User who created the cohort
ISO 8601 timestamp of creation
ISO 8601 timestamp of last calculation
Type of cohort (e.g., “realtime”)
Number of calculation errors encountered
Human-readable error message if calculation failed
Total number of cohorts matching the filters
URL for the next page of results (if available)
URL for the previous page of results (if available)
Examples
List All Cohorts
Retrieve all cohorts in your project:Filter Static Cohorts
Retrieve only static cohorts:Search Cohorts
Search for cohorts by name:Paginate Results
Retrieve cohorts with pagination:Response
Error Responses
Invalid or missing API key
Insufficient permissions to view cohorts
Project not found
Notes
- Results are ordered by creation date (newest first)
- Deleted cohorts are excluded from results
- The
countfield reflects the current number of users, updated during recalculation is_calculatingindicates if the cohort is being processed in the background- Static cohorts do not recalculate automatically
- Use
hide_behavioral_cohorts=truewhen selecting cohorts for feature flags