Organizations
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
POST | |
GET | |
GET | |
PATCH | |
PATCH | |
PATCH | |
PATCH | |
GET | |
GET | |
PATCH | |
GET | |
POST | |
DELETE | |
GET | |
GET | |
POST | |
GET | |
PATCH | |
DELETE |
Create organizations projects generate conversations public token
Projects for the current organization.
Path parameters
- idinteger
Request parameters
- namestring
- logo_media_idstring | null
- product_descriptionstring | null
- tagsarray
- app_urlsarray
- anonymize_ipsboolean
- completed_snippet_onboardingboolean
- test_account_filters
- test_account_filters_default_checkedboolean | null
- path_cleaning_filters
- is_demoboolean
- timezone
- data_attributes
- person_display_name_propertiesarray | null
- autocapture_opt_outboolean | null
- autocapture_exceptions_opt_inboolean | null
- autocapture_web_vitals_opt_inboolean | null
- autocapture_web_vitals_allowed_metrics
- autocapture_exceptions_errors_to_ignore
- capture_console_log_opt_inboolean | null
- capture_performance_opt_inboolean | null
- session_recording_opt_inboolean
- session_recording_sample_ratestring | null
- session_recording_minimum_duration_millisecondsinteger | null
- session_recording_linked_flag
- session_recording_network_payload_capture_config
- session_recording_masking_config
- session_recording_url_trigger_configarray | null
- session_recording_url_blocklist_configarray | null
- session_recording_event_trigger_configarray | null
- session_recording_trigger_match_type_configstring | null
- session_recording_trigger_groups
- session_recording_retention_period
- session_replay_config
- survey_config
- access_controlboolean
- week_start_day
- primary_dashboardinteger | null
- home_tab_dashboardinteger | null
- live_events_columnsarray | null
- recording_domainsarray | null
- inject_web_appsboolean | null
- extra_settings
- modifiers
- has_completed_onboarding_for
- surveys_opt_inboolean | null
- heatmaps_opt_inboolean | null
- flags_persistence_defaultboolean | null
- receive_org_level_activity_logsboolean | null
- business_model
- conversations_enabledboolean | null
- conversations_settingsobject | null
- logs_settings
- proactive_tasks_enabledboolean | null
- revenue_analytics_config
- marketing_analytics_config
- customer_analytics_config
- workflows_config
- feature_flag_policy_config
- base_currency
- capture_dead_clicksboolean | null
- cookieless_server_hash_mode
- human_friendly_comparison_periodsboolean | null
- feature_flag_confirmation_enabledboolean | null
- feature_flag_confirmation_messagestring | null
- default_evaluation_contexts_enabledboolean | null
- require_evaluation_contextsboolean | null
- default_data_themeinteger | null
- onboarding_tasks
- web_analytics_pre_aggregated_tables_enabledboolean | null
Response
Example request
POST /api /organizations /:organization_id /projects /:id /generate_conversations_public_tokenExample response
Status 200
Retrieve organizations projects is generating demo data
Projects for the current organization.
Path parameters
- idinteger
Response
Example request
GET /api /organizations /:organization_id /projects /:id /is_generating_demo_dataExample response
Status 200
Retrieve organizations projects logs config
Manage logs product configuration for this project's canonical environment. Members can read; writing requires project admin, matching the admin-only settings UI. Mirrors the env-router action so /api/projects/:id/logs_config/ resolves alongside the legacy /api/environments/:id/logs_config/ alias.
Path parameters
- idinteger
Response
Example request
GET /api /organizations /:organization_id /projects /:id /logs_configExample response
Status 200
Update organizations projects logs config
Manage logs product configuration for this project's canonical environment. Members can read; writing requires project admin, matching the admin-only settings UI. Mirrors the env-router action so /api/projects/:id/logs_config/ resolves alongside the legacy /api/environments/:id/logs_config/ alias.
Path parameters
- idinteger
Request parameters
- logs_distinct_id_attribute_keysarray
- logs_session_id_attribute_keysarray
- logs_pattern_message_keysarray
Response
Example request
PATCH /api /organizations /:organization_id /projects /:id /logs_configExample response
Status 200
Update organizations projects reset token
Projects for the current organization.
Path parameters
- idinteger
Request parameters
- namestring
- logo_media_idstring | null
- product_descriptionstring | null
- tagsarray
- app_urlsarray
- anonymize_ipsboolean
- completed_snippet_onboardingboolean
- test_account_filters
- test_account_filters_default_checkedboolean | null
- path_cleaning_filters
- is_demoboolean
- timezone
- data_attributes
- person_display_name_propertiesarray | null
- autocapture_opt_outboolean | null
- autocapture_exceptions_opt_inboolean | null
- autocapture_web_vitals_opt_inboolean | null
- autocapture_web_vitals_allowed_metrics
- autocapture_exceptions_errors_to_ignore
- capture_console_log_opt_inboolean | null
- capture_performance_opt_inboolean | null
- session_recording_opt_inboolean
- session_recording_sample_ratestring | null
- session_recording_minimum_duration_millisecondsinteger | null
- session_recording_linked_flag
- session_recording_network_payload_capture_config
- session_recording_masking_config
- session_recording_url_trigger_configarray | null
- session_recording_url_blocklist_configarray | null
- session_recording_event_trigger_configarray | null
- session_recording_trigger_match_type_configstring | null
- session_recording_trigger_groups
- session_recording_retention_period
- session_replay_config
- survey_config
- access_controlboolean
- week_start_day
- primary_dashboardinteger | null
- home_tab_dashboardinteger | null
- live_events_columnsarray | null
- recording_domainsarray | null
- inject_web_appsboolean | null
- extra_settings
- modifiers
- has_completed_onboarding_for
- surveys_opt_inboolean | null
- heatmaps_opt_inboolean | null
- flags_persistence_defaultboolean | null
- receive_org_level_activity_logsboolean | null
- business_model
- conversations_enabledboolean | null
- conversations_settingsobject | null
- logs_settings
- proactive_tasks_enabledboolean | null
- revenue_analytics_config
- marketing_analytics_config
- customer_analytics_config
- workflows_config
- feature_flag_policy_config
- base_currency
- capture_dead_clicksboolean | null
- cookieless_server_hash_mode
- human_friendly_comparison_periodsboolean | null
- feature_flag_confirmation_enabledboolean | null
- feature_flag_confirmation_messagestring | null
- default_evaluation_contexts_enabledboolean | null
- require_evaluation_contextsboolean | null
- default_data_themeinteger | null
- onboarding_tasks
- web_analytics_pre_aggregated_tables_enabledboolean | null
Response
Example request
PATCH /api /organizations /:organization_id /projects /:id /reset_tokenExample response
Status 200
Update organizations projects rotate heatmaps screenshot secret
Projects for the current organization.
Path parameters
- idinteger
Response
Example request
PATCH /api /organizations /:organization_id /projects /:id /rotate_heatmaps_screenshot_secretExample response
Status 200
Update organizations projects rotate secret token
Projects for the current organization.
Path parameters
- idinteger
Request parameters
- namestring
- logo_media_idstring | null
- product_descriptionstring | null
- tagsarray
- app_urlsarray
- anonymize_ipsboolean
- completed_snippet_onboardingboolean
- test_account_filters
- test_account_filters_default_checkedboolean | null
- path_cleaning_filters
- is_demoboolean
- timezone
- data_attributes
- person_display_name_propertiesarray | null
- autocapture_opt_outboolean | null
- autocapture_exceptions_opt_inboolean | null
- autocapture_web_vitals_opt_inboolean | null
- autocapture_web_vitals_allowed_metrics
- autocapture_exceptions_errors_to_ignore
- capture_console_log_opt_inboolean | null
- capture_performance_opt_inboolean | null
- session_recording_opt_inboolean
- session_recording_sample_ratestring | null
- session_recording_minimum_duration_millisecondsinteger | null
- session_recording_linked_flag
- session_recording_network_payload_capture_config
- session_recording_masking_config
- session_recording_url_trigger_configarray | null
- session_recording_url_blocklist_configarray | null
- session_recording_event_trigger_configarray | null
- session_recording_trigger_match_type_configstring | null
- session_recording_trigger_groups
- session_recording_retention_period
- session_replay_config
- survey_config
- access_controlboolean
- week_start_day
- primary_dashboardinteger | null
- home_tab_dashboardinteger | null
- live_events_columnsarray | null
- recording_domainsarray | null
- inject_web_appsboolean | null
- extra_settings
- modifiers
- has_completed_onboarding_for
- surveys_opt_inboolean | null
- heatmaps_opt_inboolean | null
- flags_persistence_defaultboolean | null
- receive_org_level_activity_logsboolean | null
- business_model
- conversations_enabledboolean | null
- conversations_settingsobject | null
- logs_settings
- proactive_tasks_enabledboolean | null
- revenue_analytics_config
- marketing_analytics_config
- customer_analytics_config
- workflows_config
- feature_flag_policy_config
- base_currency
- capture_dead_clicksboolean | null
- cookieless_server_hash_mode
- human_friendly_comparison_periodsboolean | null
- feature_flag_confirmation_enabledboolean | null
- feature_flag_confirmation_messagestring | null
- default_evaluation_contexts_enabledboolean | null
- require_evaluation_contextsboolean | null
- default_data_themeinteger | null
- onboarding_tasks
- web_analytics_pre_aggregated_tables_enabledboolean | null
Response
Example request
PATCH /api /organizations /:organization_id /projects /:id /rotate_secret_tokenExample response
Status 200
Retrieve organizations projects settings as of
Return the project settings as of the provided timestamp. Query params:
- at: ISO8601 datetime (required)
- scope: optional, one or multiple keys to filter the returned settings
Path parameters
- idinteger
Response
Example request
GET /api /organizations /:organization_id /projects /:id /settings_as_ofExample response
Status 200
Retrieve organizations projects tracing config
Manage tracing product configuration for this project's canonical environment. Members can read; writing requires project admin, matching the admin-only settings UI. Mirrors the env-router action so /api/projects/:id/tracing_config/ resolves alongside the legacy /api/environments/:id/tracing_config/ alias.
Path parameters
- idinteger
Response
Example request
GET /api /organizations /:organization_id /projects /:id /tracing_configExample response
Status 200
Update organizations projects tracing config
Manage tracing product configuration for this project's canonical environment. Members can read; writing requires project admin, matching the admin-only settings UI. Mirrors the env-router action so /api/projects/:id/tracing_config/ resolves alongside the legacy /api/environments/:id/tracing_config/ alias.
Path parameters
- idinteger
Request parameters
- tracing_distinct_id_attribute_keysarray
- tracing_session_id_attribute_keysarray
- retention_daysinteger
Response
Example request
PATCH /api /organizations /:organization_id /projects /:id /tracing_configExample response
Status 200
List all role external references
Required API key scopes
organization:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /organizations /:organization_id /role_external_referencesExample response
Status 200
Create role external references
Required API key scopes
organization:writeRequest parameters
- providerstring
- provider_organization_idstring
- provider_role_idstring
- provider_role_slugstring | null
- provider_role_namestring
- rolestring
Response
Example request
POST /api /organizations /:organization_id /role_external_referencesExample response
Status 201
Delete role external references
Required API key scopes
organization:writePath parameters
- idstring
Example request
DELETE /api /organizations /:organization_id /role_external_references /:idExample response
Status 204 No response body
Retrieve role external references lookup
Query parameters
- providerstring
- provider_organization_idstring
- provider_role_idstring
- provider_role_slugstring
Response
Example request
GET /api /organizations /:organization_id /role_external_references /lookupExample response
Status 200
List all roles
Also available via the PostHog MCP server:
roles-list— List organization roles.
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /organizations /:organization_id /rolesExample response
Status 200
Create roles
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:writeRequest parameters
- namestring
Response
Example request
POST /api /organizations /:organization_id /rolesExample response
Status 201
Retrieve roles
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:readPath parameters
- idstring
Response
Example request
GET /api /organizations /:organization_id /roles /:idExample response
Status 200
Update roles
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:writePath parameters
- idstring
Request parameters
- namestring
Response
Example request
PATCH /api /organizations /:organization_id /roles /:idExample response
Status 200
Delete roles
Role endpoints disclose member records, so they scope them the same way the members list does when the org restricts member list visibility.
Required API key scopes
organization:writePath parameters
- idstring
Example request
DELETE /api /organizations /:organization_id /roles /:id










