> ## Documentation Index
> Fetch the complete documentation index at: https://docs.permutive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Cohorts

**Tool name** `list_cohorts`

> [!NOTE]
>
> Read-only · Idempotent

Browses the cohorts available across one or more workspaces, filtered by type, state, tags, subject entity, a name keyword, and a user-count range, and ordered by short id, name, user count, or creation time. Each returned cohort includes its state, tags, subject entity, creation time, and estimated unique users over the last 30 days. Returns one page at a time.

## Example prompt

> List all the enabled lookalike cohorts available across my workspaces.

## Parameters

**cohort\_types** `enum[]`

Restrict to these cohort types. Omit to list all types the caller can see. Not every type is available to every caller — filtering on a type the caller can't see returns no cohorts for it, indistinguishable from there being none, so an empty result for a given type may mean it's unavailable rather than absent. min 1 item. each one of: `custom`, `lookalike`, `contextual`, `standard`, `classificationModel`, `advertiser`, `curated`.

**max\_users** `integer (int64)`

Only include cohorts with at most this many users. Omit for no upper bound. Filters on `users`, which is measured over the requested workspaces, so which cohorts pass is relative to workspace\_ids: a cohort empty in one workspace may have users across several, so widening the workspace set can move a cohort out of a max\_users result.

**min\_users** `integer (int64)`

Only include cohorts with at least this many users. Omit for no lower bound. Filters on `users`, which is measured over the requested workspaces, so which cohorts pass is relative to workspace\_ids: a cohort empty in one workspace may have users across several, so widening the workspace set can move a cohort into a min\_users result.

**name\_contains** `string`

Case-insensitive substring matched against each cohort's name. Omit to match all cohorts. If you wish to find cohorts by theme, use search\_cohorts instead; this is a literal substring match, not a semantic search.

**page\_token** `string`

Opaque token from a previous response's `next_page_token`, to fetch the next page.

**sort\_by** `enum`

Field to order the listing by. Defaults to short\_id. one of: `short_id`, `name`, `users`, `created_at`.

**sort\_order** `enum`

Order direction. Defaults to ascending. one of: `asc`, `desc`.

**state** `enum`

Restrict to enabled or disabled cohorts. Omit to list both. one of: `enabled`, `disabled`.

**subject\_entity** `enum`

Restrict to cohorts describing this kind of thing (a user, group of users, or piece of content). Omit to list all. one of: `user`, `user_group`, `content`.

**tags** `string[]`

Restrict to cohorts tagged with at least one of these tags (case-sensitive, exact match). min 1 item.

**workspace\_ids** `string[]` *required*

Workspaces whose cohorts are aggregated into a single flat list, not broken down by workspace. min 1 item.

## Returns

**cohorts** `CohortListItem[]`

A page of cohorts matching the query, in the requested order (short id by default).

**CohortListItem**

**available\_in\_workspaces** `string[]` *required*

Which of the requested workspaces this cohort can be used from. Pass any of these to follow-up tools. min 1 item.

**cohort\_type** `enum` *required*

Cohort type one of: `custom`, `lookalike`, `contextual`, `standard`, `classificationModel`, `advertiser`, `curated`.

**created\_at** `string (date-time)`

When the cohort was created (ISO-8601). Absent for cohort types that don't record a creation time (e.g. standard cohorts).

**name** `string` *required*

Human-readable cohort name.

**owning\_workspace** `string (uuid)`

Workspace where this cohort was originally defined.

**short\_id** `string` *required*

Short cohort identifier. Pass to get\_cohort\_detail, and as the cohort reference in measure\_audiences expressions.

**state** `string` *required*

Whether the cohort is enabled or disabled.

**subject\_entity** `enum` *required*

What the cohort targets: a user, a group of users (ie. a household), or a piece of content. one of: `user`, `user_group`, `content`.

**tags** `string[]`

Tags applied to the cohort. Empty when the cohort has none.

**users** `integer (int64)` *required*

Estimated unique users in the last 30 days, across the requested workspaces.

**next\_page\_token** `string`

Pass as `page_token` to fetch the next page. Absent on the last page. Valid for about 15 minutes from the first page, so other tool calls in between are fine.

**total\_matching** `integer (int32)` *required*

Total cohorts matching the filters across all pages, before pagination. When a user-count filter (min\_users/max\_users) is set, this total is relative to the requested workspace\_ids (because `users` is measured over that set), so it is not comparable across calls with different workspace sets — a filtered total over more workspaces can be smaller than over one.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.