Core-7
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
DELETE | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
PATCH | |
GET | |
GET | |
PATCH | |
GET | |
GET |
Delete roles
Required API key scopes
organization:writePath parameters
- idstring
Example request
DELETE /api /organizations /:organization_id /roles /:idExample response
Status 204 No response body
List all annotations
Also available via the PostHog MCP server:
annotations-list— List annotations
Create, Read, Update and Delete annotations. See docs for more information on annotations.
Required API key scopes
annotation:readQuery parameters
- limitinteger
- offsetinteger
- searchstring
Response
Example request
GET /api /projects /:project_id /annotationsExample response
Status 200
Create annotations
Also available via the PostHog MCP server:
annotation-create— Create annotation
Create, Read, Update and Delete annotations. See docs for more information on annotations.
Required API key scopes
annotation:writeRequest parameters
- contentstringnull
- date_markerstringnull
- creation_type
- dashboard_itemintegernull
- dashboard_idintegernull
- deletedboolean
- scope
Response
Example request
POST /api /projects /:project_id /annotationsExample response
Status 201
Retrieve annotations
Also available via the PostHog MCP server:
annotation-retrieve— Retrieve annotation
Create, Read, Update and Delete annotations. See docs for more information on annotations.
Required API key scopes
annotation:readPath parameters
- idinteger
Response
Example request
GET /api /projects /:project_id /annotations /:idExample response
Status 200
Update annotations
Also available via the PostHog MCP server:
annotations-partial-update— Update annotation
Create, Read, Update and Delete annotations. See docs for more information on annotations.
Required API key scopes
annotation:writePath parameters
- idinteger
Request parameters
- contentstringnull
- date_markerstringnull
- creation_type
- dashboard_itemintegernull
- dashboard_idintegernull
- deletedboolean
- scope
Response
Example request
PATCH /api /projects /:project_id /annotations /:idExample response
Status 200
Delete annotations
Also available via the PostHog MCP server:
annotation-delete— Delete annotation
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
Required API key scopes
annotation:writePath parameters
- idinteger
Example request
DELETE /api /projects /:project_id /annotations /:idExample response
Status 405 No response body
List all cohorts
Also available via the PostHog MCP server:
cohorts-list— List all cohorts
Required API key scopes
cohort:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /cohortsExample response
Status 200
Create cohorts
Also available via the PostHog MCP server:
cohorts-create— Create cohort
Required API key scopes
cohort:writeRequest parameters
- namestringnull
- descriptionstring
- groups
- deletedboolean
- filters
- query
- is_staticboolean
- cohort_type
- _create_in_folderstring
- _create_static_person_idsarrayDefault:
Response
Example request
POST /api /projects /:project_id /cohortsExample response
Status 201
Retrieve cohorts
Also available via the PostHog MCP server:
cohorts-retrieve— Get cohort
Required API key scopes
cohort:readPath parameters
- idinteger
Response
Example request
GET /api /projects /:project_id /cohorts /:idExample response
Status 200
Update cohorts
Also available via the PostHog MCP server:
cohorts-partial-update— Update cohort
Required API key scopes
cohort:writePath parameters
- idinteger
Request parameters
- namestringnull
- descriptionstring
- groups
- deletedboolean
- filters
- query
- is_staticboolean
- cohort_type
- _create_in_folderstring
- _create_static_person_idsarrayDefault:
Response
Example request
PATCH /api /projects /:project_id /cohorts /:idExample response
Status 200
Delete cohorts
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
Required API key scopes
cohort:writePath parameters
- idinteger
Example request
DELETE /api /projects /:project_id /cohorts /:idExample response
Status 405 No response body
Retrieve cohorts activity
Required API key scopes
activity_log:readPath parameters
- idinteger
Example request
GET /api /projects /:project_id /cohorts /:id /activityExample response
Status 200 No response body
Update cohorts add persons to static cohort
Also available via the PostHog MCP server:
cohorts-add-persons-to-static-cohort-partial-update— Add persons to static cohort
Required API key scopes
cohort:writePath parameters
- idinteger
Request parameters
- person_idsarray
Example request
PATCH /api /projects /:project_id /cohorts /:id /add_persons_to_static_cohortExample response
Status 200 No response body
Retrieve cohorts calculation history
Required API key scopes
cohort:readPath parameters
- idinteger
Example request
GET /api /projects /:project_id /cohorts /:id /calculation_historyExample response
Status 200 No response body
Retrieve cohorts persons
Required API key scopes
cohort:readperson:readPath parameters
- idinteger
Query parameters
- formatstringOne of:
"csv""json" - limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /cohorts /:id /personsExample response
Status 200
Update cohorts remove person from static cohort
Required API key scopes
cohort:writePath parameters
- idinteger
Request parameters
- person_idstring
Example request
PATCH /api /projects /:project_id /cohorts /:id /remove_person_from_static_cohortExample response
Status 200 No response body
Retrieve cohorts all activity
Required API key scopes
activity_log:readExample request
GET /api /projects /:project_id /cohorts /activityExample response
Status 200 No response body
List all comments
Also available via the PostHog MCP server:
comments-list— List comments and discussion threads.
Required API key scopes
comment:readQuery parameters
- completedstringOne of:
"any""open""completed" - cursorstring
- item_idstring
- kindstringOne of:
"any""comment""task" - scopestring
- searchstring
- source_commentstring
Response
Example request
GET /api /projects /:project_id /comments