Projects

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET
POST
GET
PATCH
DELETE
GET
PATCH
POST
PATCH
GET
POST
DELETE
GET
PATCH
GET
GET
PATCH
POST

List all organizations projects

Projects for the current organization.

Required API key scopes

project:read

Query parameters

  • limit
    integer
  • offset
    integer
  • search
    string

Response


Example request

GET /api/organizations/:organization_id/projects
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"project_id": 0,
"api_token": "string",
"name": "string",
"completed_snippet_onboarding": true,
"has_completed_onboarding_for": null,
"ingested_event": true,
"is_demo": true,
"timezone": "Africa/Abidjan",
"access_control": true
}
]
}

Create organizations projects

Projects for the current organization.

Required API key scopes

project:write

Request parameters

  • name
    string
  • product_description
    stringnull
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    booleannull
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    arraynull
  • correlation_config
  • autocapture_opt_out
    booleannull
  • autocapture_exceptions_opt_in
    booleannull
  • autocapture_web_vitals_opt_in
    booleannull
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    booleannull
  • capture_performance_opt_in
    booleannull
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    stringnull
  • session_recording_minimum_duration_milliseconds
    integernull
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    arraynull
  • session_recording_url_blocklist_config
    arraynull
  • session_recording_event_trigger_config
    arraynull
  • session_recording_trigger_match_type_config
    stringnull
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integernull
  • live_events_columns
    arraynull
  • recording_domains
    arraynull
  • inject_web_apps
    booleannull
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    booleannull
  • heatmaps_opt_in
    booleannull
  • flags_persistence_default
    booleannull
  • receive_org_level_activity_logs
    booleannull
  • business_model
  • conversations_enabled
    booleannull
  • conversations_settings
  • logs_settings
  • proactive_tasks_enabled
    booleannull
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • base_currency
  • capture_dead_clicks
    booleannull
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    booleannull
  • feature_flag_confirmation_enabled
    booleannull
  • feature_flag_confirmation_message
    stringnull
  • default_evaluation_contexts_enabled
    booleannull
  • require_evaluation_contexts
    booleannull
  • default_data_theme
    integernull
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    booleannull

Response


Example request

POST /api/organizations/:organization_id/projects
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/\
-d organization="string"

Example response

Status 201
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Retrieve organizations projects

Retrieve a project and its settings.

Required API key scopes

project:read

Path parameters

  • id
    integer

Response


Example request

GET /api/organizations/:organization_id/projects/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Update organizations projects

Update one or more of a project's settings. Only the fields included in the request body are changed.

Required API key scopes

project:write

Path parameters

  • id
    integer

Request parameters

  • name
    string
  • product_description
    stringnull
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    booleannull
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    arraynull
  • correlation_config
  • autocapture_opt_out
    booleannull
  • autocapture_exceptions_opt_in
    booleannull
  • autocapture_web_vitals_opt_in
    booleannull
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    booleannull
  • capture_performance_opt_in
    booleannull
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    stringnull
  • session_recording_minimum_duration_milliseconds
    integernull
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    arraynull
  • session_recording_url_blocklist_config
    arraynull
  • session_recording_event_trigger_config
    arraynull
  • session_recording_trigger_match_type_config
    stringnull
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integernull
  • live_events_columns
    arraynull
  • recording_domains
    arraynull
  • inject_web_apps
    booleannull
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    booleannull
  • heatmaps_opt_in
    booleannull
  • flags_persistence_default
    booleannull
  • receive_org_level_activity_logs
    booleannull
  • business_model
  • conversations_enabled
    booleannull
  • conversations_settings
  • logs_settings
  • proactive_tasks_enabled
    booleannull
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • base_currency
  • capture_dead_clicks
    booleannull
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    booleannull
  • feature_flag_confirmation_enabled
    booleannull
  • feature_flag_confirmation_message
    stringnull
  • default_evaluation_contexts_enabled
    booleannull
  • require_evaluation_contexts
    booleannull
  • default_data_theme
    integernull
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    booleannull

Response


Example request

PATCH /api/organizations/:organization_id/projects/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/\
-d organization="string"

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Delete organizations projects

Projects for the current organization.

Required API key scopes

project:write

Path parameters

  • id
    integer

Example request

DELETE /api/organizations/:organization_id/projects/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/

Example response

Status 204 No response body

Retrieve organizations projects activity

Projects for the current organization.

Path parameters

  • id
    integer

Response


Example request

GET /api/organizations/:organization_id/projects/:id/activity
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/activity/

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Update organizations projects add product intent

Projects for the current organization.

Required API key scopes

project:read

Path parameters

  • id
    integer

Request parameters

  • name
    string
  • product_description
    stringnull
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    booleannull
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    arraynull
  • correlation_config
  • autocapture_opt_out
    booleannull
  • autocapture_exceptions_opt_in
    booleannull
  • autocapture_web_vitals_opt_in
    booleannull
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    booleannull
  • capture_performance_opt_in
    booleannull
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    stringnull
  • session_recording_minimum_duration_milliseconds
    integernull
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    arraynull
  • session_recording_url_blocklist_config
    arraynull
  • session_recording_event_trigger_config
    arraynull
  • session_recording_trigger_match_type_config
    stringnull
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integernull
  • live_events_columns
    arraynull
  • recording_domains
    arraynull
  • inject_web_apps
    booleannull
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    booleannull
  • heatmaps_opt_in
    booleannull
  • flags_persistence_default
    booleannull
  • receive_org_level_activity_logs
    booleannull
  • business_model
  • conversations_enabled
    booleannull
  • conversations_settings
  • logs_settings
  • proactive_tasks_enabled
    booleannull
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • base_currency
  • capture_dead_clicks
    booleannull
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    booleannull
  • feature_flag_confirmation_enabled
    booleannull
  • feature_flag_confirmation_message
    stringnull
  • default_evaluation_contexts_enabled
    booleannull
  • require_evaluation_contexts
    booleannull
  • default_data_theme
    integernull
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    booleannull

Response


Example request

PATCH /api/organizations/:organization_id/projects/:id/add_product_intent
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/add_product_intent/\
-d organization="string"

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Create organizations projects change organization

Projects for the current organization.

Path parameters

  • id
    integer

Request parameters

  • name
    string
  • product_description
    stringnull
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    booleannull
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    arraynull
  • correlation_config
  • autocapture_opt_out
    booleannull
  • autocapture_exceptions_opt_in
    booleannull
  • autocapture_web_vitals_opt_in
    booleannull
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    booleannull
  • capture_performance_opt_in
    booleannull
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    stringnull
  • session_recording_minimum_duration_milliseconds
    integernull
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    arraynull
  • session_recording_url_blocklist_config
    arraynull
  • session_recording_event_trigger_config
    arraynull
  • session_recording_trigger_match_type_config
    stringnull
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integernull
  • live_events_columns
    arraynull
  • recording_domains
    arraynull
  • inject_web_apps
    booleannull
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    booleannull
  • heatmaps_opt_in
    booleannull
  • flags_persistence_default
    booleannull
  • receive_org_level_activity_logs
    booleannull
  • business_model
  • conversations_enabled
    booleannull
  • conversations_settings
  • logs_settings
  • proactive_tasks_enabled
    booleannull
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • base_currency
  • capture_dead_clicks
    booleannull
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    booleannull
  • feature_flag_confirmation_enabled
    booleannull
  • feature_flag_confirmation_message
    stringnull
  • default_evaluation_contexts_enabled
    booleannull
  • require_evaluation_contexts
    booleannull
  • default_data_theme
    integernull
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    booleannull

Response


Example request

POST /api/organizations/:organization_id/projects/:id/change_organization
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/change_organization/\
-d organization="string"

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Update organizations projects complete product onboarding

Projects for the current organization.

Required API key scopes

project:read

Path parameters

  • id
    integer

Request parameters

  • name
    string
  • product_description
    stringnull
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    booleannull
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    arraynull
  • correlation_config
  • autocapture_opt_out
    booleannull
  • autocapture_exceptions_opt_in
    booleannull
  • autocapture_web_vitals_opt_in
    booleannull
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    booleannull
  • capture_performance_opt_in
    booleannull
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    stringnull
  • session_recording_minimum_duration_milliseconds
    integernull
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    arraynull
  • session_recording_url_blocklist_config
    arraynull
  • session_recording_event_trigger_config
    arraynull
  • session_recording_trigger_match_type_config
    stringnull
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integernull
  • live_events_columns
    arraynull
  • recording_domains
    arraynull
  • inject_web_apps
    booleannull
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    booleannull
  • heatmaps_opt_in
    booleannull
  • flags_persistence_default
    booleannull
  • receive_org_level_activity_logs
    booleannull
  • business_model
  • conversations_enabled
    booleannull
  • conversations_settings
  • logs_settings
  • proactive_tasks_enabled
    booleannull
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • base_currency
  • capture_dead_clicks
    booleannull
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    booleannull
  • feature_flag_confirmation_enabled
    booleannull
  • feature_flag_confirmation_message
    stringnull
  • default_evaluation_contexts_enabled
    booleannull
  • require_evaluation_contexts
    booleannull
  • default_data_theme
    integernull
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    booleannull

Response


Example request

PATCH /api/organizations/:organization_id/projects/:id/complete_product_onboarding
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/complete_product_onboarding/\
-d organization="string"

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Retrieve organizations projects default evaluation contexts

Manage default evaluation contexts for a project.

Path parameters

  • id
    integer

Response


Example request

GET /api/organizations/:organization_id/projects/:id/default_evaluation_contexts
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/default_evaluation_contexts/

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Create organizations projects default evaluation contexts

Manage default evaluation contexts for a project.

Path parameters

  • id
    integer

Request parameters

  • name
    string
  • product_description
    stringnull
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    booleannull
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    arraynull
  • correlation_config
  • autocapture_opt_out
    booleannull
  • autocapture_exceptions_opt_in
    booleannull
  • autocapture_web_vitals_opt_in
    booleannull
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    booleannull
  • capture_performance_opt_in
    booleannull
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    stringnull
  • session_recording_minimum_duration_milliseconds
    integernull
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    arraynull
  • session_recording_url_blocklist_config
    arraynull
  • session_recording_event_trigger_config
    arraynull
  • session_recording_trigger_match_type_config
    stringnull
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integernull
  • live_events_columns
    arraynull
  • recording_domains
    arraynull
  • inject_web_apps
    booleannull
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    booleannull
  • heatmaps_opt_in
    booleannull
  • flags_persistence_default
    booleannull
  • receive_org_level_activity_logs
    booleannull
  • business_model
  • conversations_enabled
    booleannull
  • conversations_settings
  • logs_settings
  • proactive_tasks_enabled
    booleannull
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • base_currency
  • capture_dead_clicks
    booleannull
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    booleannull
  • feature_flag_confirmation_enabled
    booleannull
  • feature_flag_confirmation_message
    stringnull
  • default_evaluation_contexts_enabled
    booleannull
  • require_evaluation_contexts
    booleannull
  • default_data_theme
    integernull
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    booleannull

Response


Example request

POST /api/organizations/:organization_id/projects/:id/default_evaluation_contexts
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/default_evaluation_contexts/\
-d organization="string"

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Delete organizations projects default evaluation contexts

Manage default evaluation contexts for a project.

Path parameters

  • id
    integer

Example request

DELETE /api/organizations/:organization_id/projects/:id/default_evaluation_contexts
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/default_evaluation_contexts/

Example response

Status 204 No response body

Retrieve organizations projects default release conditions

Manage default release conditions for new feature flags in this project.

Path parameters

  • id
    integer

Response


Example request

GET /api/organizations/:organization_id/projects/:id/default_release_conditions
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/default_release_conditions/

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Update organizations projects delete secret token backup

Projects for the current organization.

Path parameters

  • id
    integer

Request parameters

  • name
    string
  • product_description
    stringnull
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    booleannull
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    arraynull
  • correlation_config
  • autocapture_opt_out
    booleannull
  • autocapture_exceptions_opt_in
    booleannull
  • autocapture_web_vitals_opt_in
    booleannull
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    booleannull
  • capture_performance_opt_in
    booleannull
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    stringnull
  • session_recording_minimum_duration_milliseconds
    integernull
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    arraynull
  • session_recording_url_blocklist_config
    arraynull
  • session_recording_event_trigger_config
    arraynull
  • session_recording_trigger_match_type_config
    stringnull
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integernull
  • live_events_columns
    arraynull
  • recording_domains
    arraynull
  • inject_web_apps
    booleannull
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    booleannull
  • heatmaps_opt_in
    booleannull
  • flags_persistence_default
    booleannull
  • receive_org_level_activity_logs
    booleannull
  • business_model
  • conversations_enabled
    booleannull
  • conversations_settings
  • logs_settings
  • proactive_tasks_enabled
    booleannull
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • base_currency
  • capture_dead_clicks
    booleannull
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    booleannull
  • feature_flag_confirmation_enabled
    booleannull
  • feature_flag_confirmation_message
    stringnull
  • default_evaluation_contexts_enabled
    booleannull
  • require_evaluation_contexts
    booleannull
  • default_data_theme
    integernull
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    booleannull

Response


Example request

PATCH /api/organizations/:organization_id/projects/:id/delete_secret_token_backup
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/delete_secret_token_backup/\
-d organization="string"

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Retrieve organizations projects event ingestion restrictions

Projects for the current organization.

Required API key scopes

project:read

Path parameters

  • id
    integer

Response


Example request

GET /api/organizations/:organization_id/projects/:id/event_ingestion_restrictions
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/event_ingestion_restrictions/

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Retrieve organizations projects experiments config

Manage experiment configuration for this project.

Path parameters

  • id
    integer

Response


Example request

GET /api/organizations/:organization_id/projects/:id/experiments_config
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/experiments_config/

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Update organizations projects experiments config

Manage experiment configuration for this project.

Path parameters

  • id
    integer

Request parameters

  • name
    string
  • product_description
    stringnull
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    booleannull
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    arraynull
  • correlation_config
  • autocapture_opt_out
    booleannull
  • autocapture_exceptions_opt_in
    booleannull
  • autocapture_web_vitals_opt_in
    booleannull
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    booleannull
  • capture_performance_opt_in
    booleannull
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    stringnull
  • session_recording_minimum_duration_milliseconds
    integernull
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    arraynull
  • session_recording_url_blocklist_config
    arraynull
  • session_recording_event_trigger_config
    arraynull
  • session_recording_trigger_match_type_config
    stringnull
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integernull
  • live_events_columns
    arraynull
  • recording_domains
    arraynull
  • inject_web_apps
    booleannull
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    booleannull
  • heatmaps_opt_in
    booleannull
  • flags_persistence_default
    booleannull
  • receive_org_level_activity_logs
    booleannull
  • business_model
  • conversations_enabled
    booleannull
  • conversations_settings
  • logs_settings
  • proactive_tasks_enabled
    booleannull
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • base_currency
  • capture_dead_clicks
    booleannull
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    booleannull
  • feature_flag_confirmation_enabled
    booleannull
  • feature_flag_confirmation_message
    stringnull
  • default_evaluation_contexts_enabled
    booleannull
  • require_evaluation_contexts
    booleannull
  • default_data_theme
    integernull
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    booleannull

Response


Example request

PATCH /api/organizations/:organization_id/projects/:id/experiments_config
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/experiments_config/\
-d organization="string"

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Create organizations projects generate conversations public token

Projects for the current organization.

Path parameters

  • id
    integer

Request parameters

  • name
    string
  • product_description
    stringnull
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    booleannull
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    arraynull
  • correlation_config
  • autocapture_opt_out
    booleannull
  • autocapture_exceptions_opt_in
    booleannull
  • autocapture_web_vitals_opt_in
    booleannull
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    booleannull
  • capture_performance_opt_in
    booleannull
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    stringnull
  • session_recording_minimum_duration_milliseconds
    integernull
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    arraynull
  • session_recording_url_blocklist_config
    arraynull
  • session_recording_event_trigger_config
    arraynull
  • session_recording_trigger_match_type_config
    stringnull
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integernull
  • live_events_columns
    arraynull
  • recording_domains
    arraynull
  • inject_web_apps
    booleannull
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    booleannull
  • heatmaps_opt_in
    booleannull
  • flags_persistence_default
    booleannull
  • receive_org_level_activity_logs
    booleannull
  • business_model
  • conversations_enabled
    booleannull
  • conversations_settings
  • logs_settings
  • proactive_tasks_enabled
    booleannull
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • base_currency
  • capture_dead_clicks
    booleannull
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    booleannull
  • feature_flag_confirmation_enabled
    booleannull
  • feature_flag_confirmation_message
    stringnull
  • default_evaluation_contexts_enabled
    booleannull
  • require_evaluation_contexts
    booleannull
  • default_data_theme
    integernull
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    booleannull

Response


Example request

POST /api/organizations/:organization_id/projects/:id/generate_conversations_public_token
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/projects/:id/generate_conversations_public_token/\
-d organization="string"

Example response

Status 200
RESPONSE
{
"id": 0,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"name": "string",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{}
],
"live_events_token": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"api_token": "string",
"app_urls": [
"string"
],
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"ingested_event": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"capture_performance_opt_in": true,
"session_recording_opt_in": true,
"session_recording_sample_rate": "string",
"session_recording_minimum_duration_milliseconds": 30000,
"session_recording_linked_flag": null,
"session_recording_network_payload_capture_config": null,
"session_recording_masking_config": null,
"session_recording_url_trigger_config": [
null
],
"session_recording_url_blocklist_config": [
null
],
"session_recording_event_trigger_config": [
"string"
],
"session_recording_trigger_match_type_config": "string",
"session_recording_trigger_groups": null,
"session_recording_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"access_control": true,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"person_on_events_querying_enabled": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"default_modifiers": {},
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"product_intents": [
{
"product_type": "string",
"created_at": "2019-08-24T14:15:22Z",
"onboarding_completed_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"flags_persistence_default": true,
"secret_api_token": "string",
"secret_api_token_backup": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0
},
"workflows_config": {
"capture_workflows_engagement_events": true
},
"base_currency": "AED",
"capture_dead_clicks": true,
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"default_data_theme": -2147483648,
"onboarding_tasks": null,
"web_analytics_pre_aggregated_tables_enabled": true
}

Community questions

Questions about this page? or post a community question.