List Cohorts
Retrieve a list of all cohorts (user segments) in your project. Supports filtering by type, creator, and search term.Endpoint
Path Parameters
integer
required
The ID of the project to retrieve cohorts from
Query Parameters
string
Filter cohorts by type:
static- Only static cohorts (fixed membership)dynamic- Only dynamic cohorts (auto-updating)
integer
Filter cohorts created by a specific user ID
string
Search cohorts by name (case-insensitive partial match)
boolean
default:false
If true, exclude cohorts with behavioral filters (useful for feature flag selection)
integer
default:100
Maximum number of results to return
integer
default:0
Number of results to skip (for pagination)
Response Fields
array
Array of cohort objects
integer
Unique identifier for the cohort
string
Name of the cohort
string
Description of the cohort
object
Filter criteria defining cohort membership
boolean
Whether this cohort is static (true) or dynamic (false)
integer
Current number of users in the cohort
boolean
Whether the cohort is currently being recalculated
object
User who created the cohort
string
ISO 8601 timestamp of creation
string
ISO 8601 timestamp of last calculation
string
Type of cohort (e.g., “realtime”)
integer
Number of calculation errors encountered
string
Human-readable error message if calculation failed
integer
Total number of cohorts matching the filters
string
URL for the next page of results (if available)
string
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
error
Invalid or missing API key
error
Insufficient permissions to view cohorts
error
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