Organizations

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

Endpoints

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

Retrieve organizations projects access control members

Every organization member's access in this project. For the project and for each resource type, the response gives the member's own rule and the level that is enforced. It also says where the enforced level comes from: the member's rule, a role's rule, the project default, or full access as an organization admin. Pass member_id for one member.

Required API key scopes

access_control:read

Path parameters

  • id
    integer

Query parameters

  • member_id
    string

Response


Example request

GET /api/organizations/:organization_id/projects/:id/access_control_members
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/access_control_members/

Example response

Status 200
RESPONSE
{
"available_project_levels": [
"string"
],
"available_resource_levels": [
"string"
],
"can_edit": true,
"results": [
{
"organization_membership_id": "36a5127e-4d6e-4b4e-93ab-c14c6bbfd8ff",
"user": {
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"first_name": "string",
"last_name": "string",
"email": "user@example.com"
},
"organization_level": 1,
"role_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"project": {
"access_level": "string",
"effective_access_level": "string",
"inherited_access": {
"access_level": "string",
"source": "object",
"source_subject": "member",
"source_resource": "action",
"source_resource_id": "string"
},
"minimum": "string",
"maximum": "string"
},
"resources": {
"property1": {
"access_level": "string",
"effective_access_level": "string",
"inherited_access": {
"access_level": "string",
"source": "object",
"source_subject": "member",
"source_resource": "action",
"source_resource_id": "string"
},
"minimum": "string",
"maximum": "string"
},
"property2": {
"access_level": "string",
"effective_access_level": "string",
"inherited_access": {
"access_level": "string",
"source": "object",
"source_subject": "member",
"source_resource": "action",
"source_resource_id": "string"
},
"minimum": "string",
"maximum": "string"
}
}
}
]
}

Retrieve organizations projects access control role objects

Object rules configured for a role: the single objects the role's members are granted or denied, regardless of the resource-level rules.

Required API key scopes

access_control:read

Path parameters

  • id
    integer

Query parameters

  • role_id
    string

Response


Example request

GET /api/organizations/:organization_id/projects/:id/access_control_role_objects
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/access_control_role_objects/

Example response

Status 200
RESPONSE
{
"results": [
{
"resource": "action",
"resource_id": "string",
"name": "string",
"short_id": "string",
"access_level": "string"
}
]
}

Retrieve organizations projects access control role properties

Property rules configured for a role: the person and event properties the role's members can read, read and write, or not see.

Required API key scopes

access_control:read

Path parameters

  • id
    integer

Query parameters

  • role_id
    string

Response


Example request

GET /api/organizations/:organization_id/projects/:id/access_control_role_properties
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/access_control_role_properties/

Example response

Status 200
RESPONSE
{
"results": [
{
"property_definition_id": "73b88124-586a-4ae3-bb4b-246f06c7f87f",
"property": "string",
"property_type": "string",
"access_level": "string"
}
]
}

Retrieve organizations projects access control roles

Every role's resolved access to this project and to each resource type in it: the role's own rule, the level that is enforced, and the rule the enforced level comes from. Pass role_id for one role.

Required API key scopes

access_control:read

Path parameters

  • id
    integer

Query parameters

  • role_id
    string

Response


Example request

GET /api/organizations/:organization_id/projects/:id/access_control_roles
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/access_control_roles/

Example response

Status 200
RESPONSE
{
"available_project_levels": [
"string"
],
"available_resource_levels": [
"string"
],
"can_edit": true,
"results": [
{
"role_id": "ac4e70c8-d5be-48af-93eb-760f58fc91a9",
"role_name": "string",
"project": {
"access_level": "string",
"effective_access_level": "string",
"inherited_access": {
"access_level": "string",
"source": "object",
"source_subject": "member",
"source_resource": "action",
"source_resource_id": "string"
},
"minimum": "string",
"maximum": "string"
},
"resources": {
"property1": {
"access_level": "string",
"effective_access_level": "string",
"inherited_access": {
"access_level": "string",
"source": "object",
"source_subject": "member",
"source_resource": "action",
"source_resource_id": "string"
},
"minimum": "string",
"maximum": "string"
},
"property2": {
"access_level": "string",
"effective_access_level": "string",
"inherited_access": {
"access_level": "string",
"source": "object",
"source_subject": "member",
"source_resource": "action",
"source_resource_id": "string"
},
"minimum": "string",
"maximum": "string"
}
}
}
]
}

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",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"product_description": "string",
"tags": [
"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"
],
"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,
"home_tab_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",
"heatmaps_screenshot_secret": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": {},
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"deletion_scheduled_at": "2019-08-24T14:15:22Z",
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"flag_evaluations_mode": 0,
"api_host": "string",
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": {
"property1": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
},
"property2": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
}
},
"conversion_goals": [
{
"conversion_goal_id": "string",
"conversion_goal_name": "string",
"counts_as_customer": null,
"counts_as_revenue": null,
"custom_name": null,
"event": null,
"kind": "EventsNode",
"limit": null,
"math": null,
"math_group_type_index": null,
"math_hogql": null,
"math_multiplier": null,
"math_property": null,
"math_property_revenue_currency": null,
"math_property_type": null,
"name": "string",
"optionalInFunnel": null,
"orderBy": null,
"properties": null,
"response": null,
"schema_map": {
"property1": "string",
"property2": "string"
},
"version": null
}
],
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"filter_test_accounts": true,
"campaign_name_mappings": {
"property1": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property2": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
"custom_source_mappings": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"campaign_field_preferences": {
"property1": {
"match_field": "campaign_name"
},
"property2": {
"match_field": "campaign_name"
}
}
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0,
"default_pinned_properties": [
{
"kind": "custom_property",
"id": "string"
}
]
},
"workflows_config": {
"capture_workflows_engagement_events": true,
"email_tracking_consent_mode": "off",
"email_utm_tags_enabled": true,
"email_utm_params": {
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_content": "string"
},
"workflow_task_rate_limit_per_day": 0,
"workflow_task_team_rate_limit_per_day": 0,
"replay_vision_scan_rate_limit_per_day": 0,
"replay_vision_scan_team_rate_limit_per_day": 0,
"default_email_integration_id": 0,
"marketing_frequency_cap_max_messages": 1,
"marketing_frequency_cap_window_days": 1
},
"feature_flag_policy_config": {
"require_tags": true,
"blocked_hosts": [
"string"
],
"blocked_ips": [
"string"
]
},
"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
  • logo_media_id
    string | null
  • product_description
    string | null
  • tags
    array
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    boolean | null
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    array | null
  • autocapture_opt_out
    boolean | null
  • autocapture_exceptions_opt_in
    boolean | null
  • autocapture_web_vitals_opt_in
    boolean | null
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    boolean | null
  • capture_performance_opt_in
    boolean | null
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    string | null
  • session_recording_minimum_duration_milliseconds
    integer | null
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    array | null
  • session_recording_url_blocklist_config
    array | null
  • session_recording_event_trigger_config
    array | null
  • session_recording_trigger_match_type_config
    string | null
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integer | null
  • home_tab_dashboard
    integer | null
  • live_events_columns
    array | null
  • recording_domains
    array | null
  • inject_web_apps
    boolean | null
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    boolean | null
  • heatmaps_opt_in
    boolean | null
  • flags_persistence_default
    boolean | null
  • receive_org_level_activity_logs
    boolean | null
  • business_model
  • conversations_enabled
    boolean | null
  • conversations_settings
    object | null
  • logs_settings
  • proactive_tasks_enabled
    boolean | null
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • feature_flag_policy_config
  • base_currency
  • capture_dead_clicks
    boolean | null
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    boolean | null
  • feature_flag_confirmation_enabled
    boolean | null
  • feature_flag_confirmation_message
    string | null
  • default_evaluation_contexts_enabled
    boolean | null
  • require_evaluation_contexts
    boolean | null
  • default_data_theme
    integer | null
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    boolean | null

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",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"product_description": "string",
"tags": [
"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"
],
"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,
"home_tab_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",
"heatmaps_screenshot_secret": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": {},
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"deletion_scheduled_at": "2019-08-24T14:15:22Z",
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"flag_evaluations_mode": 0,
"api_host": "string",
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": {
"property1": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
},
"property2": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
}
},
"conversion_goals": [
{
"conversion_goal_id": "string",
"conversion_goal_name": "string",
"counts_as_customer": null,
"counts_as_revenue": null,
"custom_name": null,
"event": null,
"kind": "EventsNode",
"limit": null,
"math": null,
"math_group_type_index": null,
"math_hogql": null,
"math_multiplier": null,
"math_property": null,
"math_property_revenue_currency": null,
"math_property_type": null,
"name": "string",
"optionalInFunnel": null,
"orderBy": null,
"properties": null,
"response": null,
"schema_map": {
"property1": "string",
"property2": "string"
},
"version": null
}
],
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"filter_test_accounts": true,
"campaign_name_mappings": {
"property1": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property2": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
"custom_source_mappings": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"campaign_field_preferences": {
"property1": {
"match_field": "campaign_name"
},
"property2": {
"match_field": "campaign_name"
}
}
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0,
"default_pinned_properties": [
{
"kind": "custom_property",
"id": "string"
}
]
},
"workflows_config": {
"capture_workflows_engagement_events": true,
"email_tracking_consent_mode": "off",
"email_utm_tags_enabled": true,
"email_utm_params": {
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_content": "string"
},
"workflow_task_rate_limit_per_day": 0,
"workflow_task_team_rate_limit_per_day": 0,
"replay_vision_scan_rate_limit_per_day": 0,
"replay_vision_scan_team_rate_limit_per_day": 0,
"default_email_integration_id": 0,
"marketing_frequency_cap_max_messages": 1,
"marketing_frequency_cap_window_days": 1
},
"feature_flag_policy_config": {
"require_tags": true,
"blocked_hosts": [
"string"
],
"blocked_ips": [
"string"
]
},
"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 cancel deletion

Cancel a scheduled project deletion and restore access to the project.

Path parameters

  • id
    integer

Response


Example request

POST /api/organizations/:organization_id/projects/:id/cancel-deletion
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/cancel-deletion/

Example response

Status 200
RESPONSE
{
"id": 0,
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"name": "string",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"product_description": "string",
"created_at": "2019-08-24T14:15:22Z",
"is_pending_deletion": true,
"deletion_scheduled_at": "2019-08-24T14:15:22Z",
"tags": [
"string"
]
}

Create organizations projects change organization

Projects for the current organization.

Path parameters

  • id
    integer

Request parameters

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

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",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"product_description": "string",
"tags": [
"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"
],
"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,
"home_tab_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",
"heatmaps_screenshot_secret": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": {},
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"deletion_scheduled_at": "2019-08-24T14:15:22Z",
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"flag_evaluations_mode": 0,
"api_host": "string",
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": {
"property1": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
},
"property2": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
}
},
"conversion_goals": [
{
"conversion_goal_id": "string",
"conversion_goal_name": "string",
"counts_as_customer": null,
"counts_as_revenue": null,
"custom_name": null,
"event": null,
"kind": "EventsNode",
"limit": null,
"math": null,
"math_group_type_index": null,
"math_hogql": null,
"math_multiplier": null,
"math_property": null,
"math_property_revenue_currency": null,
"math_property_type": null,
"name": "string",
"optionalInFunnel": null,
"orderBy": null,
"properties": null,
"response": null,
"schema_map": {
"property1": "string",
"property2": "string"
},
"version": null
}
],
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"filter_test_accounts": true,
"campaign_name_mappings": {
"property1": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property2": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
"custom_source_mappings": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"campaign_field_preferences": {
"property1": {
"match_field": "campaign_name"
},
"property2": {
"match_field": "campaign_name"
}
}
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0,
"default_pinned_properties": [
{
"kind": "custom_property",
"id": "string"
}
]
},
"workflows_config": {
"capture_workflows_engagement_events": true,
"email_tracking_consent_mode": "off",
"email_utm_tags_enabled": true,
"email_utm_params": {
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_content": "string"
},
"workflow_task_rate_limit_per_day": 0,
"workflow_task_team_rate_limit_per_day": 0,
"replay_vision_scan_rate_limit_per_day": 0,
"replay_vision_scan_team_rate_limit_per_day": 0,
"default_email_integration_id": 0,
"marketing_frequency_cap_max_messages": 1,
"marketing_frequency_cap_window_days": 1
},
"feature_flag_policy_config": {
"require_tags": true,
"blocked_hosts": [
"string"
],
"blocked_ips": [
"string"
]
},
"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
  • logo_media_id
    string | null
  • product_description
    string | null
  • tags
    array
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    boolean | null
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    array | null
  • autocapture_opt_out
    boolean | null
  • autocapture_exceptions_opt_in
    boolean | null
  • autocapture_web_vitals_opt_in
    boolean | null
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    boolean | null
  • capture_performance_opt_in
    boolean | null
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    string | null
  • session_recording_minimum_duration_milliseconds
    integer | null
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    array | null
  • session_recording_url_blocklist_config
    array | null
  • session_recording_event_trigger_config
    array | null
  • session_recording_trigger_match_type_config
    string | null
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integer | null
  • home_tab_dashboard
    integer | null
  • live_events_columns
    array | null
  • recording_domains
    array | null
  • inject_web_apps
    boolean | null
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    boolean | null
  • heatmaps_opt_in
    boolean | null
  • flags_persistence_default
    boolean | null
  • receive_org_level_activity_logs
    boolean | null
  • business_model
  • conversations_enabled
    boolean | null
  • conversations_settings
    object | null
  • logs_settings
  • proactive_tasks_enabled
    boolean | null
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • feature_flag_policy_config
  • base_currency
  • capture_dead_clicks
    boolean | null
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    boolean | null
  • feature_flag_confirmation_enabled
    boolean | null
  • feature_flag_confirmation_message
    string | null
  • default_evaluation_contexts_enabled
    boolean | null
  • require_evaluation_contexts
    boolean | null
  • default_data_theme
    integer | null
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    boolean | null

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",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"product_description": "string",
"tags": [
"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"
],
"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,
"home_tab_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",
"heatmaps_screenshot_secret": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": {},
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"deletion_scheduled_at": "2019-08-24T14:15:22Z",
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"flag_evaluations_mode": 0,
"api_host": "string",
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": {
"property1": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
},
"property2": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
}
},
"conversion_goals": [
{
"conversion_goal_id": "string",
"conversion_goal_name": "string",
"counts_as_customer": null,
"counts_as_revenue": null,
"custom_name": null,
"event": null,
"kind": "EventsNode",
"limit": null,
"math": null,
"math_group_type_index": null,
"math_hogql": null,
"math_multiplier": null,
"math_property": null,
"math_property_revenue_currency": null,
"math_property_type": null,
"name": "string",
"optionalInFunnel": null,
"orderBy": null,
"properties": null,
"response": null,
"schema_map": {
"property1": "string",
"property2": "string"
},
"version": null
}
],
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"filter_test_accounts": true,
"campaign_name_mappings": {
"property1": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property2": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
"custom_source_mappings": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"campaign_field_preferences": {
"property1": {
"match_field": "campaign_name"
},
"property2": {
"match_field": "campaign_name"
}
}
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0,
"default_pinned_properties": [
{
"kind": "custom_property",
"id": "string"
}
]
},
"workflows_config": {
"capture_workflows_engagement_events": true,
"email_tracking_consent_mode": "off",
"email_utm_tags_enabled": true,
"email_utm_params": {
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_content": "string"
},
"workflow_task_rate_limit_per_day": 0,
"workflow_task_team_rate_limit_per_day": 0,
"replay_vision_scan_rate_limit_per_day": 0,
"replay_vision_scan_team_rate_limit_per_day": 0,
"default_email_integration_id": 0,
"marketing_frequency_cap_max_messages": 1,
"marketing_frequency_cap_window_days": 1
},
"feature_flag_policy_config": {
"require_tags": true,
"blocked_hosts": [
"string"
],
"blocked_ips": [
"string"
]
},
"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. Members can read; writing requires project admin, matching the admin-only settings UI.

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",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"product_description": "string",
"tags": [
"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"
],
"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,
"home_tab_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",
"heatmaps_screenshot_secret": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": {},
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"deletion_scheduled_at": "2019-08-24T14:15:22Z",
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"flag_evaluations_mode": 0,
"api_host": "string",
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": {
"property1": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
},
"property2": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
}
},
"conversion_goals": [
{
"conversion_goal_id": "string",
"conversion_goal_name": "string",
"counts_as_customer": null,
"counts_as_revenue": null,
"custom_name": null,
"event": null,
"kind": "EventsNode",
"limit": null,
"math": null,
"math_group_type_index": null,
"math_hogql": null,
"math_multiplier": null,
"math_property": null,
"math_property_revenue_currency": null,
"math_property_type": null,
"name": "string",
"optionalInFunnel": null,
"orderBy": null,
"properties": null,
"response": null,
"schema_map": {
"property1": "string",
"property2": "string"
},
"version": null
}
],
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"filter_test_accounts": true,
"campaign_name_mappings": {
"property1": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property2": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
"custom_source_mappings": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"campaign_field_preferences": {
"property1": {
"match_field": "campaign_name"
},
"property2": {
"match_field": "campaign_name"
}
}
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0,
"default_pinned_properties": [
{
"kind": "custom_property",
"id": "string"
}
]
},
"workflows_config": {
"capture_workflows_engagement_events": true,
"email_tracking_consent_mode": "off",
"email_utm_tags_enabled": true,
"email_utm_params": {
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_content": "string"
},
"workflow_task_rate_limit_per_day": 0,
"workflow_task_team_rate_limit_per_day": 0,
"replay_vision_scan_rate_limit_per_day": 0,
"replay_vision_scan_team_rate_limit_per_day": 0,
"default_email_integration_id": 0,
"marketing_frequency_cap_max_messages": 1,
"marketing_frequency_cap_window_days": 1
},
"feature_flag_policy_config": {
"require_tags": true,
"blocked_hosts": [
"string"
],
"blocked_ips": [
"string"
]
},
"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. Members can read; writing requires project admin, matching the admin-only settings UI.

Path parameters

  • id
    integer

Request parameters

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

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",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"product_description": "string",
"tags": [
"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"
],
"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,
"home_tab_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",
"heatmaps_screenshot_secret": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": {},
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"deletion_scheduled_at": "2019-08-24T14:15:22Z",
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"flag_evaluations_mode": 0,
"api_host": "string",
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": {
"property1": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
},
"property2": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
}
},
"conversion_goals": [
{
"conversion_goal_id": "string",
"conversion_goal_name": "string",
"counts_as_customer": null,
"counts_as_revenue": null,
"custom_name": null,
"event": null,
"kind": "EventsNode",
"limit": null,
"math": null,
"math_group_type_index": null,
"math_hogql": null,
"math_multiplier": null,
"math_property": null,
"math_property_revenue_currency": null,
"math_property_type": null,
"name": "string",
"optionalInFunnel": null,
"orderBy": null,
"properties": null,
"response": null,
"schema_map": {
"property1": "string",
"property2": "string"
},
"version": null
}
],
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"filter_test_accounts": true,
"campaign_name_mappings": {
"property1": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property2": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
"custom_source_mappings": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"campaign_field_preferences": {
"property1": {
"match_field": "campaign_name"
},
"property2": {
"match_field": "campaign_name"
}
}
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0,
"default_pinned_properties": [
{
"kind": "custom_property",
"id": "string"
}
]
},
"workflows_config": {
"capture_workflows_engagement_events": true,
"email_tracking_consent_mode": "off",
"email_utm_tags_enabled": true,
"email_utm_params": {
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_content": "string"
},
"workflow_task_rate_limit_per_day": 0,
"workflow_task_team_rate_limit_per_day": 0,
"replay_vision_scan_rate_limit_per_day": 0,
"replay_vision_scan_team_rate_limit_per_day": 0,
"default_email_integration_id": 0,
"marketing_frequency_cap_max_messages": 1,
"marketing_frequency_cap_window_days": 1
},
"feature_flag_policy_config": {
"require_tags": true,
"blocked_hosts": [
"string"
],
"blocked_ips": [
"string"
]
},
"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. Members can read; writing requires project admin, matching the admin-only settings UI.

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. Members can read; writing requires project admin, matching the admin-only settings UI.

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",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"product_description": "string",
"tags": [
"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"
],
"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,
"home_tab_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",
"heatmaps_screenshot_secret": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": {},
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"deletion_scheduled_at": "2019-08-24T14:15:22Z",
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"flag_evaluations_mode": 0,
"api_host": "string",
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": {
"property1": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
},
"property2": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
}
},
"conversion_goals": [
{
"conversion_goal_id": "string",
"conversion_goal_name": "string",
"counts_as_customer": null,
"counts_as_revenue": null,
"custom_name": null,
"event": null,
"kind": "EventsNode",
"limit": null,
"math": null,
"math_group_type_index": null,
"math_hogql": null,
"math_multiplier": null,
"math_property": null,
"math_property_revenue_currency": null,
"math_property_type": null,
"name": "string",
"optionalInFunnel": null,
"orderBy": null,
"properties": null,
"response": null,
"schema_map": {
"property1": "string",
"property2": "string"
},
"version": null
}
],
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"filter_test_accounts": true,
"campaign_name_mappings": {
"property1": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property2": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
"custom_source_mappings": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"campaign_field_preferences": {
"property1": {
"match_field": "campaign_name"
},
"property2": {
"match_field": "campaign_name"
}
}
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0,
"default_pinned_properties": [
{
"kind": "custom_property",
"id": "string"
}
]
},
"workflows_config": {
"capture_workflows_engagement_events": true,
"email_tracking_consent_mode": "off",
"email_utm_tags_enabled": true,
"email_utm_params": {
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_content": "string"
},
"workflow_task_rate_limit_per_day": 0,
"workflow_task_team_rate_limit_per_day": 0,
"replay_vision_scan_rate_limit_per_day": 0,
"replay_vision_scan_team_rate_limit_per_day": 0,
"default_email_integration_id": 0,
"marketing_frequency_cap_max_messages": 1,
"marketing_frequency_cap_window_days": 1
},
"feature_flag_policy_config": {
"require_tags": true,
"blocked_hosts": [
"string"
],
"blocked_ips": [
"string"
]
},
"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
  • logo_media_id
    string | null
  • product_description
    string | null
  • tags
    array
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    boolean | null
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    array | null
  • autocapture_opt_out
    boolean | null
  • autocapture_exceptions_opt_in
    boolean | null
  • autocapture_web_vitals_opt_in
    boolean | null
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    boolean | null
  • capture_performance_opt_in
    boolean | null
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    string | null
  • session_recording_minimum_duration_milliseconds
    integer | null
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    array | null
  • session_recording_url_blocklist_config
    array | null
  • session_recording_event_trigger_config
    array | null
  • session_recording_trigger_match_type_config
    string | null
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integer | null
  • home_tab_dashboard
    integer | null
  • live_events_columns
    array | null
  • recording_domains
    array | null
  • inject_web_apps
    boolean | null
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    boolean | null
  • heatmaps_opt_in
    boolean | null
  • flags_persistence_default
    boolean | null
  • receive_org_level_activity_logs
    boolean | null
  • business_model
  • conversations_enabled
    boolean | null
  • conversations_settings
    object | null
  • logs_settings
  • proactive_tasks_enabled
    boolean | null
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • feature_flag_policy_config
  • base_currency
  • capture_dead_clicks
    boolean | null
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    boolean | null
  • feature_flag_confirmation_enabled
    boolean | null
  • feature_flag_confirmation_message
    string | null
  • default_evaluation_contexts_enabled
    boolean | null
  • require_evaluation_contexts
    boolean | null
  • default_data_theme
    integer | null
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    boolean | null

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",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"product_description": "string",
"tags": [
"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"
],
"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,
"home_tab_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",
"heatmaps_screenshot_secret": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": {},
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"deletion_scheduled_at": "2019-08-24T14:15:22Z",
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"flag_evaluations_mode": 0,
"api_host": "string",
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": {
"property1": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
},
"property2": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
}
},
"conversion_goals": [
{
"conversion_goal_id": "string",
"conversion_goal_name": "string",
"counts_as_customer": null,
"counts_as_revenue": null,
"custom_name": null,
"event": null,
"kind": "EventsNode",
"limit": null,
"math": null,
"math_group_type_index": null,
"math_hogql": null,
"math_multiplier": null,
"math_property": null,
"math_property_revenue_currency": null,
"math_property_type": null,
"name": "string",
"optionalInFunnel": null,
"orderBy": null,
"properties": null,
"response": null,
"schema_map": {
"property1": "string",
"property2": "string"
},
"version": null
}
],
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"filter_test_accounts": true,
"campaign_name_mappings": {
"property1": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property2": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
"custom_source_mappings": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"campaign_field_preferences": {
"property1": {
"match_field": "campaign_name"
},
"property2": {
"match_field": "campaign_name"
}
}
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0,
"default_pinned_properties": [
{
"kind": "custom_property",
"id": "string"
}
]
},
"workflows_config": {
"capture_workflows_engagement_events": true,
"email_tracking_consent_mode": "off",
"email_utm_tags_enabled": true,
"email_utm_params": {
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_content": "string"
},
"workflow_task_rate_limit_per_day": 0,
"workflow_task_team_rate_limit_per_day": 0,
"replay_vision_scan_rate_limit_per_day": 0,
"replay_vision_scan_team_rate_limit_per_day": 0,
"default_email_integration_id": 0,
"marketing_frequency_cap_max_messages": 1,
"marketing_frequency_cap_window_days": 1
},
"feature_flag_policy_config": {
"require_tags": true,
"blocked_hosts": [
"string"
],
"blocked_ips": [
"string"
]
},
"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 evaluation context suggestions

Hide an evaluation context name from the flag editor's suggestion list, or restore it.

POST hides the name; DELETE restores it. The underlying context row and any flags already using it are never modified — this only controls what gets suggested.

Path parameters

  • id
    integer

Request parameters

  • context_name
    string

Response


Example request

POST /api/organizations/:organization_id/projects/:id/evaluation_context_suggestions
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/evaluation_context_suggestions/\
-d context_name="string"

Example response

Status 200
RESPONSE
{
"success": true,
"name": "string",
"hidden_from_suggestions": true
}

Delete organizations projects evaluation context suggestions

Hide an evaluation context name from the flag editor's suggestion list, or restore it.

POST hides the name; DELETE restores it. The underlying context row and any flags already using it are never modified — this only controls what gets suggested.

Path parameters

  • id
    integer

Query parameters

  • context_name
    string

Response


Example request

DELETE /api/organizations/:organization_id/projects/:id/evaluation_context_suggestions
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/evaluation_context_suggestions/

Example response

Status 200
RESPONSE
{
"success": true,
"name": "string",
"hidden_from_suggestions": true
}

List all organizations projects event ingestion restrictions

Projects for the current organization.

Required API key scopes

project:read

Path parameters

  • id
    integer

Query parameters

  • search
    string

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
{
"restriction_type": "skip_person_processing",
"distinct_ids": [
"string"
],
"session_ids": [
"string"
],
"event_names": [
"string"
],
"event_uuids": [
"string"
],
"pipelines": [
"analytics"
]
}

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",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"product_description": "string",
"tags": [
"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"
],
"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,
"home_tab_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",
"heatmaps_screenshot_secret": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": {},
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"deletion_scheduled_at": "2019-08-24T14:15:22Z",
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"flag_evaluations_mode": 0,
"api_host": "string",
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": {
"property1": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
},
"property2": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
}
},
"conversion_goals": [
{
"conversion_goal_id": "string",
"conversion_goal_name": "string",
"counts_as_customer": null,
"counts_as_revenue": null,
"custom_name": null,
"event": null,
"kind": "EventsNode",
"limit": null,
"math": null,
"math_group_type_index": null,
"math_hogql": null,
"math_multiplier": null,
"math_property": null,
"math_property_revenue_currency": null,
"math_property_type": null,
"name": "string",
"optionalInFunnel": null,
"orderBy": null,
"properties": null,
"response": null,
"schema_map": {
"property1": "string",
"property2": "string"
},
"version": null
}
],
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"filter_test_accounts": true,
"campaign_name_mappings": {
"property1": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property2": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
"custom_source_mappings": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"campaign_field_preferences": {
"property1": {
"match_field": "campaign_name"
},
"property2": {
"match_field": "campaign_name"
}
}
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0,
"default_pinned_properties": [
{
"kind": "custom_property",
"id": "string"
}
]
},
"workflows_config": {
"capture_workflows_engagement_events": true,
"email_tracking_consent_mode": "off",
"email_utm_tags_enabled": true,
"email_utm_params": {
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_content": "string"
},
"workflow_task_rate_limit_per_day": 0,
"workflow_task_team_rate_limit_per_day": 0,
"replay_vision_scan_rate_limit_per_day": 0,
"replay_vision_scan_team_rate_limit_per_day": 0,
"default_email_integration_id": 0,
"marketing_frequency_cap_max_messages": 1,
"marketing_frequency_cap_window_days": 1
},
"feature_flag_policy_config": {
"require_tags": true,
"blocked_hosts": [
"string"
],
"blocked_ips": [
"string"
]
},
"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
  • logo_media_id
    string | null
  • product_description
    string | null
  • tags
    array
  • app_urls
    array
  • anonymize_ips
    boolean
  • completed_snippet_onboarding
    boolean
  • test_account_filters
  • test_account_filters_default_checked
    boolean | null
  • path_cleaning_filters
  • is_demo
    boolean
  • timezone
  • data_attributes
  • person_display_name_properties
    array | null
  • autocapture_opt_out
    boolean | null
  • autocapture_exceptions_opt_in
    boolean | null
  • autocapture_web_vitals_opt_in
    boolean | null
  • autocapture_web_vitals_allowed_metrics
  • autocapture_exceptions_errors_to_ignore
  • capture_console_log_opt_in
    boolean | null
  • capture_performance_opt_in
    boolean | null
  • session_recording_opt_in
    boolean
  • session_recording_sample_rate
    string | null
  • session_recording_minimum_duration_milliseconds
    integer | null
  • session_recording_linked_flag
  • session_recording_network_payload_capture_config
  • session_recording_masking_config
  • session_recording_url_trigger_config
    array | null
  • session_recording_url_blocklist_config
    array | null
  • session_recording_event_trigger_config
    array | null
  • session_recording_trigger_match_type_config
    string | null
  • session_recording_trigger_groups
  • session_recording_retention_period
  • session_replay_config
  • survey_config
  • access_control
    boolean
  • week_start_day
  • primary_dashboard
    integer | null
  • home_tab_dashboard
    integer | null
  • live_events_columns
    array | null
  • recording_domains
    array | null
  • inject_web_apps
    boolean | null
  • extra_settings
  • modifiers
  • has_completed_onboarding_for
  • surveys_opt_in
    boolean | null
  • heatmaps_opt_in
    boolean | null
  • flags_persistence_default
    boolean | null
  • receive_org_level_activity_logs
    boolean | null
  • business_model
  • conversations_enabled
    boolean | null
  • conversations_settings
    object | null
  • logs_settings
  • proactive_tasks_enabled
    boolean | null
  • revenue_analytics_config
  • marketing_analytics_config
  • customer_analytics_config
  • workflows_config
  • feature_flag_policy_config
  • base_currency
  • capture_dead_clicks
    boolean | null
  • cookieless_server_hash_mode
  • human_friendly_comparison_periods
    boolean | null
  • feature_flag_confirmation_enabled
    boolean | null
  • feature_flag_confirmation_message
    string | null
  • default_evaluation_contexts_enabled
    boolean | null
  • require_evaluation_contexts
    boolean | null
  • default_data_theme
    integer | null
  • onboarding_tasks
  • web_analytics_pre_aggregated_tables_enabled
    boolean | null

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",
"logo_media_id": "a5d9f2f1-d934-4d2e-bebe-4b3cdcd08a33",
"product_description": "string",
"tags": [
"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"
],
"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,
"home_tab_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",
"heatmaps_screenshot_secret": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": {},
"logs_settings": null,
"proactive_tasks_enabled": true,
"available_setup_task_ids": [
"ingest_first_event"
],
"is_pending_deletion": true,
"deletion_scheduled_at": "2019-08-24T14:15:22Z",
"project_id": 0,
"user_access_level": "string",
"managed_viewsets": {
"property1": true,
"property2": true
},
"flag_evaluations_mode": 0,
"api_host": "string",
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": {
"property1": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
},
"property2": {
"ad_group_id": null,
"ad_group_name": null,
"ad_id": null,
"ad_name": null,
"campaign": null,
"clicks": null,
"cost": null,
"currency": null,
"date": null,
"id": null,
"impressions": null,
"reported_conversion": null,
"reported_conversion_value": null,
"source": null
}
},
"conversion_goals": [
{
"conversion_goal_id": "string",
"conversion_goal_name": "string",
"counts_as_customer": null,
"counts_as_revenue": null,
"custom_name": null,
"event": null,
"kind": "EventsNode",
"limit": null,
"math": null,
"math_group_type_index": null,
"math_hogql": null,
"math_multiplier": null,
"math_property": null,
"math_property_revenue_currency": null,
"math_property_type": null,
"name": "string",
"optionalInFunnel": null,
"orderBy": null,
"properties": null,
"response": null,
"schema_map": {
"property1": "string",
"property2": "string"
},
"version": null
}
],
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"filter_test_accounts": true,
"campaign_name_mappings": {
"property1": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property2": {
"property1": [
"string"
],
"property2": [
"string"
]
}
},
"custom_source_mappings": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"campaign_field_preferences": {
"property1": {
"match_field": "campaign_name"
},
"property2": {
"match_field": "campaign_name"
}
}
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null,
"account_group_type_index": 0,
"default_pinned_properties": [
{
"kind": "custom_property",
"id": "string"
}
]
},
"workflows_config": {
"capture_workflows_engagement_events": true,
"email_tracking_consent_mode": "off",
"email_utm_tags_enabled": true,
"email_utm_params": {
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_content": "string"
},
"workflow_task_rate_limit_per_day": 0,
"workflow_task_team_rate_limit_per_day": 0,
"replay_vision_scan_rate_limit_per_day": 0,
"replay_vision_scan_team_rate_limit_per_day": 0,
"default_email_integration_id": 0,
"marketing_frequency_cap_max_messages": 1,
"marketing_frequency_cap_window_days": 1
},
"feature_flag_policy_config": {
"require_tags": true,
"blocked_hosts": [
"string"
],
"blocked_ips": [
"string"
]
},
"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
}