Environments-26

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

Endpoints

PATCH
DELETE
POST
POST
POST
GET
GET
POST
GET
PATCH
DELETE

Update environments warehouse tables

Required API key scopes

warehouse_table:write

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • deleted
    boolean
  • name
    string
  • format
  • url_pattern
    string
  • credential

Response


Example request

PATCH /api/environments/:project_id/warehouse_tables/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/warehouse_tables/:id/\
-d deleted="boolean"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"format": "CSV",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"url_pattern": "string",
"credential": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"access_key": "string",
"access_secret": "string"
},
"columns": "string",
"external_data_source": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"status": "string",
"source_type": "Ashby"
},
"external_schema": "string"
}

Update environments warehouse tables

Required API key scopes

warehouse_table:write

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • deleted
    boolean
  • name
    string
  • format
  • url_pattern
    string
  • credential

Response


Example request

PATCH /api/environments/:project_id/warehouse_tables/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/warehouse_tables/:id/\
-d deleted="boolean"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"deleted": true,
"name": "string",
"format": "CSV",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"url_pattern": "string",
"credential": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"access_key": "string",
"access_secret": "string"
},
"columns": "string",
"external_data_source": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"status": "string",
"source_type": "Ashby"
},
"external_schema": "string"
}

Delete environments warehouse tables

Required API key scopes

warehouse_table:write

Path parameters

  • id
    string
  • project_id
    string

Example request

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

Example response

Status 204 No response body

Delete environments warehouse tables

Required API key scopes

warehouse_table:write

Path parameters

  • id
    string
  • project_id
    string

Example request

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

Example response

Status 204 No response body

Create environments warehouse tables refresh schema

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • deleted
    boolean
  • name
    string
  • format
  • url_pattern
    string
  • credential

Example request

POST /api/environments/:project_id/warehouse_tables/:id/refresh_schema
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/environments/:project_id/warehouse_tables/:id/refresh_schema/\
-d name="string",\
-d format=undefined,\
-d url_pattern="string",\
-d credential=undefined

Example response

Status 200 No response body

Create environments warehouse tables refresh schema

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • deleted
    boolean
  • name
    string
  • format
  • url_pattern
    string
  • credential

Example request

POST /api/environments/:project_id/warehouse_tables/:id/refresh_schema
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/environments/:project_id/warehouse_tables/:id/refresh_schema/\
-d name="string",\
-d format=undefined,\
-d url_pattern="string",\
-d credential=undefined

Example response

Status 200 No response body

Create environments warehouse tables update schema

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • deleted
    boolean
  • name
    string
  • format
  • url_pattern
    string
  • credential

Example request

POST /api/environments/:project_id/warehouse_tables/:id/update_schema
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/environments/:project_id/warehouse_tables/:id/update_schema/\
-d name="string",\
-d format=undefined,\
-d url_pattern="string",\
-d credential=undefined

Example response

Status 200 No response body

Create environments warehouse tables update schema

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • deleted
    boolean
  • name
    string
  • format
  • url_pattern
    string
  • credential

Example request

POST /api/environments/:project_id/warehouse_tables/:id/update_schema
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/environments/:project_id/warehouse_tables/:id/update_schema/\
-d name="string",\
-d format=undefined,\
-d url_pattern="string",\
-d credential=undefined

Example response

Status 200 No response body

Create environments warehouse tables file

Required API key scopes

warehouse_table:write

Path parameters

  • project_id
    string


Example request

Example response

Status 200 No response body

Create environments warehouse tables file

Required API key scopes

warehouse_table:write

Path parameters

  • project_id
    string


Example request

Example response

Status 200 No response body

Retrieve environments web vitals

Required API key scopes

query:read

Path parameters

  • project_id
    string

Query parameters

  • pathname
    string

Example request

GET /api/environments/:project_id/web_vitals
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/web_vitals/

Example response

Status 200 No response body

Retrieve environments web vitals

Required API key scopes

query:read

Path parameters

  • project_id
    string

Query parameters

  • pathname
    string

Example request

GET /api/environments/:project_id/web_vitals
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/web_vitals/

Example response

Status 200 No response body

List all environments

Projects for the current organization.

Required API key scopes

project:read

Path parameters

  • project_id
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

Example response

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

Create environments

Projects for the current organization.

Required API key scopes

project:write

Path parameters

  • project_id
    string

Request parameters

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

Response


Example request

POST /api/projects/:project_id/environments
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/projects/:project_id/environments/\
-d uuid="string"

Example response

Status 201
RESPONSE
{
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"name": "string",
"access_control": true,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"project_id": -9223372036854776000,
"api_token": "string",
"secret_api_token": "string",
"secret_api_token_backup": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"ingested_event": true,
"default_modifiers": {
"property1": null,
"property2": null
},
"person_on_events_querying_enabled": true,
"user_access_level": "string",
"app_urls": [
"string"
],
"slack_incoming_webhook": "string",
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"logs_settings": null,
"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_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"flags_persistence_default": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"capture_dead_clicks": true,
"default_data_theme": -2147483648,
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null
},
"onboarding_tasks": null,
"base_currency": "USD",
"web_analytics_pre_aggregated_tables_enabled": true,
"experiment_recalculation_time": "14:15:22Z",
"default_experiment_confidence_level": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{
"property1": null,
"property2": null
}
],
"live_events_token": "string",
"product_intents": "string",
"managed_viewsets": "string"
}

Retrieve environments

Projects for the current organization.

Required API key scopes

project:read

Path parameters

  • id
    integer
  • project_id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"name": "string",
"access_control": true,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"project_id": -9223372036854776000,
"api_token": "string",
"secret_api_token": "string",
"secret_api_token_backup": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"ingested_event": true,
"default_modifiers": {
"property1": null,
"property2": null
},
"person_on_events_querying_enabled": true,
"user_access_level": "string",
"app_urls": [
"string"
],
"slack_incoming_webhook": "string",
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"logs_settings": null,
"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_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"flags_persistence_default": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"capture_dead_clicks": true,
"default_data_theme": -2147483648,
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null
},
"onboarding_tasks": null,
"base_currency": "USD",
"web_analytics_pre_aggregated_tables_enabled": true,
"experiment_recalculation_time": "14:15:22Z",
"default_experiment_confidence_level": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{
"property1": null,
"property2": null
}
],
"live_events_token": "string",
"product_intents": "string",
"managed_viewsets": "string"
}

Update environments

Projects for the current organization.

Required API key scopes

project:read

Path parameters

  • id
    integer
  • project_id
    string

Request parameters

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

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"name": "string",
"access_control": true,
"organization": "452c1a86-a0af-475b-b03f-724878b0f387",
"project_id": -9223372036854776000,
"api_token": "string",
"secret_api_token": "string",
"secret_api_token_backup": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"ingested_event": true,
"default_modifiers": {
"property1": null,
"property2": null
},
"person_on_events_querying_enabled": true,
"user_access_level": "string",
"app_urls": [
"string"
],
"slack_incoming_webhook": "string",
"anonymize_ips": true,
"completed_snippet_onboarding": true,
"test_account_filters": null,
"test_account_filters_default_checked": true,
"path_cleaning_filters": null,
"is_demo": true,
"timezone": "Africa/Abidjan",
"data_attributes": null,
"person_display_name_properties": [
"string"
],
"correlation_config": null,
"autocapture_opt_out": true,
"autocapture_exceptions_opt_in": true,
"autocapture_web_vitals_opt_in": true,
"autocapture_web_vitals_allowed_metrics": null,
"autocapture_exceptions_errors_to_ignore": null,
"capture_console_log_opt_in": true,
"logs_settings": null,
"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_retention_period": "30d",
"session_replay_config": null,
"survey_config": null,
"week_start_day": 0,
"primary_dashboard": 0,
"live_events_columns": [
"string"
],
"recording_domains": [
"string"
],
"cookieless_server_hash_mode": 0,
"human_friendly_comparison_periods": true,
"inject_web_apps": true,
"extra_settings": null,
"modifiers": null,
"has_completed_onboarding_for": null,
"surveys_opt_in": true,
"heatmaps_opt_in": true,
"flags_persistence_default": true,
"feature_flag_confirmation_enabled": true,
"feature_flag_confirmation_message": "string",
"default_evaluation_contexts_enabled": true,
"require_evaluation_contexts": true,
"capture_dead_clicks": true,
"default_data_theme": -2147483648,
"revenue_analytics_config": {
"base_currency": "AED",
"events": null,
"goals": null,
"filter_test_accounts": true
},
"marketing_analytics_config": {
"sources_map": null,
"conversion_goals": null,
"attribution_window_days": 1,
"attribution_mode": "first_touch",
"campaign_name_mappings": null,
"custom_source_mappings": null,
"campaign_field_preferences": null
},
"customer_analytics_config": {
"activity_event": null,
"signup_pageview_event": null,
"signup_event": null,
"subscription_event": null,
"payment_event": null
},
"onboarding_tasks": null,
"base_currency": "USD",
"web_analytics_pre_aggregated_tables_enabled": true,
"experiment_recalculation_time": "14:15:22Z",
"default_experiment_confidence_level": "string",
"receive_org_level_activity_logs": true,
"business_model": "b2b",
"conversations_enabled": true,
"conversations_settings": null,
"effective_membership_level": 1,
"has_group_types": true,
"group_types": [
{
"property1": null,
"property2": null
}
],
"live_events_token": "string",
"product_intents": "string",
"managed_viewsets": "string"
}

Delete environments

Projects for the current organization.

Required API key scopes

project:write

Path parameters

  • id
    integer
  • project_id
    string

Example request

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

Example response

Status 204 No response body
Next page →

Community questions

Questions about this page? or post a community question.