How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

PostHog cohorts API

The cohorts API from PostHog — 8 operation(s) for cohorts.

PostHog cohorts API is one of 139 APIs that PostHog publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include Cohorts. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, a getting-started guide, authentication docs, and an AsyncAPI specification.

This API exposes 12 operations across 8 paths, and defines 22 schemas. It is described by OpenAPI 3.2.0, at version 1.0.0.

Requests are made against a single base URL, https://app.posthog.com/api.

12 operations 8 paths 22 schemas 1 DELETE6 GET3 PATCH1 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.0.0
Base URL
https://app.posthog.com/api
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

PostHog cohorts API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (PersonalAPIKeyAuth).

Paths & Operations 12

Across 8 paths, the API surfaces 12 operations — 1 DELETE, 6 GET, 3 PATCH, 1 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

cohorts 12
GET
/api/projects/{project_id}/cohorts/
cohorts_list 3 params → 200
POST
/api/projects/{project_id}/cohorts/
cohorts_create 1 param body → 201
GET
/api/projects/{project_id}/cohorts/{id}/
cohorts_retrieve 2 params → 200
PUT
/api/projects/{project_id}/cohorts/{id}/
cohorts_update 2 params body → 200
PATCH
/api/projects/{project_id}/cohorts/{id}/
cohorts_partial_update 2 params body → 200
DELETE
/api/projects/{project_id}/cohorts/{id}/
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
cohorts_destroy 2 params → 405
GET
/api/projects/{project_id}/cohorts/{id}/activity/
cohorts_activity_retrieve 2 params → 200
PATCH
/api/projects/{project_id}/cohorts/{id}/add_persons_to_static_cohort/
cohorts_add_persons_to_static_cohort_partial_update 2 params body → 200
GET
/api/projects/{project_id}/cohorts/{id}/calculation_history/
cohorts_calculation_history_retrieve 2 params → 200
GET
/api/projects/{project_id}/cohorts/{id}/persons/
cohorts_persons_retrieve 5 params → 200
PATCH
/api/projects/{project_id}/cohorts/{id}/remove_person_from_static_cohort/
cohorts_remove_person_from_static_cohort_partial_update 2 params body → 200
GET
/api/projects/{project_id}/cohorts/activity/
cohorts_all_activity_retrieve 1 param → 200

Schemas 22

The contract defines 22 schemas that model the data the API accepts and returns. The most detailed are PatchedCohort (22 properties), Cohort (22 properties), BehavioralFilter (21 properties), CohortPersonResult (11 properties). Each schema is shown below with its type and property counts.

PropertyGroupOperator
string
NullEnum
Cohort
object
22 properties 12 required
PatchedRemovePersonRequest
object
1 property
CohortTypeEnum
string
static - static personproperty - personproperty behavioral - behavioral realtime - realtime analytical - analytical
CohortFilterGroup
object
AND/OR group containing cohort filters. Named to avoid collision with analytics Group model.
2 properties 2 required
HogQLFilter
object
3 properties 2 required
PatchedAddPersonsToStaticCohortRequest
object
1 property
CohortPersonResult
object
11 properties 11 required
EventPropFilter
object
4 properties 3 required
PaginatedCohortList
object
4 properties 2 required
CohortPersonResultTypeEnum
string
person - person
CohortFilters
object
1 property 1 required
PatchedCohort
object
22 properties
UserBasic
object
9 properties 4 required
BlankEnum
RoleAtOrganizationEnum
string
engineering - Engineering data - Data product - Product Management founder - Founder leadership - Leadership marketing - Marketing sales - Sales / Success othe…
BehavioralFilter
object
21 properties 4 required
EventPropFilterTypeEnum
string
CohortFilter
object
7 properties 3 required
CohortPersonsResponse
object
3 properties 3 required
PersonFilter
object
8 properties 2 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

posthog-cohorts-api-openapi.yml Raw ↑

Other APIs PostHog publishes across the network.

PostHog Capture API
PostHog Query API
PostHog Persons API
PostHog Feature Flags API
PostHog Experiments API
PostHog Insights API
PostHog Cohorts API
PostHog Annotations API
PostHog actions API
PostHog activity_log API
PostHog activity_logs API
PostHog advanced_activity_logs API
Where this information came from

This is an independent, third-party profile of PostHog cohorts API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.