---
title: "Retrieve individual cohort"
method: GET
path: "/v2/cohorts/{cohortId}"
tags: ["v2"]
---

# Retrieve individual cohort

`GET /v2/cohorts/{cohortId}`

## Request

- Base URL: `https://api.permutive.app`
- URL: `https://api.permutive.app/v2/cohorts/{cohortId}`
- Auth: API key in query parameter `k`
- TypeScript: <https://skmtc.dev/permutive/apis/custom-cohort-segmentation-api/docs/v2/cohorts/:cohortId/get.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint returns details of a single cohort belonging either to the workspace that owns the requesting API key, or to a parent workspace if the requesting workspace inherits the cohort from that workspace.

If the requested cohort is not a lookalike-based cohort, the response will include the query definition.

## Path parameters

- `cohortId` string, required

## Response `200`

Cohort in full (including query)

- union
  - SegmentLookalikeApiWithAudience
    - `id` string, required
    - `code` integer, required
    - `name` string, required
    - `description` string
    - `tags` string[]
    - `state` 'Enabled' | 'Disabled', required
    - `workspaceId` string
    - `segmentType` union, required
      - Offline
      - RealTime
    - `liveAudienceSize` integer
    - `createdAt` string, date-time, required
    - `lastUpdatedAt` string, date-time, required
  - SegmentQueryApiV2WithAudience
    - `id` string, required
    - `code` integer, required
    - `name` string, required
    - `description` string
    - `query` unknown, required
    - `tags` string[]
    - `state` 'Enabled' | 'Disabled', required
    - `workspaceId` string
    - `segmentType` union, required
      - Offline
      - RealTime
    - `liveAudienceSize` integer
    - `createdAt` string, date-time, required
    - `lastUpdatedAt` string, date-time, required

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict
- `500`: Internal server error

---

[API](https://skmtc.dev/permutive/apis/custom-cohort-segmentation-api.md) - [All operations](https://skmtc.dev/permutive/apis/custom-cohort-segmentation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/permutive/apis/custom-cohort-segmentation-api/revisions/9fb06b4e8a44?raw)
