Skip to main content
GET
/
v2
/
cohorts
Retrieve all cohorts
curl --request GET \
  --url 'https://api.permutive.app/cohorts-api/v2/cohorts?k='
[
  {
    "id": "38470a62-9837-4c86-bbf3-45dd6d52dd83",
    "code": 12345,
    "name": "Example Segment A",
    "description": "This segment is an example for documentation purposes",
    "tags": [
      "tag_a",
      "tag_b"
    ],
    "state": "Enabled",
    "workspace_id": "0bd63f73-6b67-4766-8c86-fa1d2cf87194",
    "segment_type": "real_time",
    "created_at": "2022-09-22T15:44:29.513211710Z",
    "last_updated_at": "2022-09-22T15:44:29.513214670Z"
  },
  {
    "id": "be1e0886-4a52-442f-89e5-6bf0ff652ac7",
    "code": 23456,
    "name": "Example Segment B",
    "description": "This is a second segment for documentation purposes",
    "tags": [],
    "state": "Enabled",
    "workspace_id": "0bd63f73-6b67-4766-8c86-fa1d2cf87194",
    "segment_type": "real_time",
    "live_audience_size": 10000,
    "created_at": "2022-09-22T15:44:29.513246606Z",
    "last_updated_at": "2022-09-22T15:44:29.513246784Z"
  }
]

Authorizations

k
string
query
required

Query Parameters

include-child-workspaces
boolean

Whether to return cohorts belonging to workspaces below the requesting workspace in the organization hierarchy. Defaults to false if not specified.

Response

List of cohorts in summary form (excluding query)

id
string
required
code
integer
required
name
string
required
state
enum<string>
required
Available options:
Enabled,
Disabled
workspaceId
string
required
segmentType
object
required
createdAt
string<date-time>
required
lastUpdatedAt
string<date-time>
required
description
string
tags
string[]
liveAudienceSize
integer