This endpoint returns a list of feature flags and their details like name, key, variants, rollout_percentage, and more.
To evaluate and determine the value of flags for a given user, use the flags endpoint instead.
For instructions on how to authenticate to use this endpoint, see API overview.
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
POST | |
POST | |
GET |
This endpoint returns a list of feature flags and their details like name, key, variants, rollout_percentage, and more.
To evaluate and determine the value of flags for a given user, use the flags endpoint instead.
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
feature_flag:read"STALE""false""true" "both""client""server" "false""true" "boolean""experiment""multivariant" GET /api /projects /:project_id /feature_flagsexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/feature_flags/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/feature_flags/".format(project_id=project_id),headers={"Authorization": "Bearer {}".format(api_key)},).json()
{"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,"name": "string","key": "string","filters": {"property1": null,"property2": null},"deleted": true,"active": true,"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","updated_at": "2019-08-24T14:15:22Z","version": 0,"last_modified_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"},"ensure_experience_continuity": true,"experiment_set": "string","surveys": {"property1": null,"property2": null},"features": {"property1": null,"property2": null},"rollback_conditions": null,"performed_rollback": true,"can_edit": true,"tags": [null],"evaluation_tags": [null],"usage_dashboard": 0,"analytics_dashboards": [0],"has_enriched_analytics": true,"user_access_level": "string","creation_context": "feature_flags","is_remote_configuration": true,"has_encrypted_payloads": true,"status": "string","evaluation_runtime": "server","bucketing_identifier": "distinct_id","last_called_at": "2019-08-24T14:15:22Z","_create_in_folder": "string","_should_create_usage_dashboard": true}]}
This endpoint returns a list of feature flags and their details like name, key, variants, rollout_percentage, and more.
To evaluate and determine the value of flags for a given user, use the flags endpoint instead.
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
feature_flag:read"STALE""false""true" "both""client""server" "false""true" "boolean""experiment""multivariant" GET /api /projects /:project_id /feature_flagsexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/feature_flags/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/feature_flags/".format(project_id=project_id),headers={"Authorization": "Bearer {}".format(api_key)},).json()
{"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,"name": "string","key": "string","filters": {"property1": null,"property2": null},"deleted": true,"active": true,"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","updated_at": "2019-08-24T14:15:22Z","version": 0,"last_modified_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"},"ensure_experience_continuity": true,"experiment_set": "string","surveys": {"property1": null,"property2": null},"features": {"property1": null,"property2": null},"rollback_conditions": null,"performed_rollback": true,"can_edit": true,"tags": [null],"evaluation_tags": [null],"usage_dashboard": 0,"analytics_dashboards": [0],"has_enriched_analytics": true,"user_access_level": "string","creation_context": "feature_flags","is_remote_configuration": true,"has_encrypted_payloads": true,"status": "string","evaluation_runtime": "server","bucketing_identifier": "distinct_id","last_called_at": "2019-08-24T14:15:22Z","_create_in_folder": "string","_should_create_usage_dashboard": true}]}
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
feature_flag:write0truePOST /api /projects /:project_id /feature_flagsexport 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/feature_flags/\-d key="string"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/feature_flags/".format(project_id=project_id),headers={"Authorization": "Bearer {}".format(api_key)},data={"key": "string"}).json()
{"id": 0,"name": "string","key": "string","filters": {"property1": null,"property2": null},"deleted": true,"active": true,"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","updated_at": "2019-08-24T14:15:22Z","version": 0,"last_modified_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"},"ensure_experience_continuity": true,"experiment_set": "string","surveys": {"property1": null,"property2": null},"features": {"property1": null,"property2": null},"rollback_conditions": null,"performed_rollback": true,"can_edit": true,"tags": [null],"evaluation_tags": [null],"usage_dashboard": 0,"analytics_dashboards": [0],"has_enriched_analytics": true,"user_access_level": "string","creation_context": "feature_flags","is_remote_configuration": true,"has_encrypted_payloads": true,"status": "string","evaluation_runtime": "server","bucketing_identifier": "distinct_id","last_called_at": "2019-08-24T14:15:22Z","_create_in_folder": "string","_should_create_usage_dashboard": true}
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
feature_flag:write0truePOST /api /projects /:project_id /feature_flagsexport 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/feature_flags/\-d key="string"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/feature_flags/".format(project_id=project_id),headers={"Authorization": "Bearer {}".format(api_key)},data={"key": "string"}).json()
{"id": 0,"name": "string","key": "string","filters": {"property1": null,"property2": null},"deleted": true,"active": true,"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","updated_at": "2019-08-24T14:15:22Z","version": 0,"last_modified_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"},"ensure_experience_continuity": true,"experiment_set": "string","surveys": {"property1": null,"property2": null},"features": {"property1": null,"property2": null},"rollback_conditions": null,"performed_rollback": true,"can_edit": true,"tags": [null],"evaluation_tags": [null],"usage_dashboard": 0,"analytics_dashboards": [0],"has_enriched_analytics": true,"user_access_level": "string","creation_context": "feature_flags","is_remote_configuration": true,"has_encrypted_payloads": true,"status": "string","evaluation_runtime": "server","bucketing_identifier": "distinct_id","last_called_at": "2019-08-24T14:15:22Z","_create_in_folder": "string","_should_create_usage_dashboard": true}
This endpoint returns a feature flag and its details like name, key, variants, rollout_percentage, and more.
To evaluate and determine the value of a flag for a given user, use the flags endpoint instead.
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
feature_flag:readGET /api /projects /:project_id /feature_flags /:idexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/feature_flags/:id/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
{"id": 0,"name": "string","key": "string","filters": {"property1": null,"property2": null},"deleted": true,"active": true,"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","updated_at": "2019-08-24T14:15:22Z","version": 0,"last_modified_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"},"ensure_experience_continuity": true,"experiment_set": "string","surveys": {"property1": null,"property2": null},"features": {"property1": null,"property2": null},"rollback_conditions": null,"performed_rollback": true,"can_edit": true,"tags": [null],"evaluation_tags": [null],"usage_dashboard": 0,"analytics_dashboards": [0],"has_enriched_analytics": true,"user_access_level": "string","creation_context": "feature_flags","is_remote_configuration": true,"has_encrypted_payloads": true,"status": "string","evaluation_runtime": "server","bucketing_identifier": "distinct_id","last_called_at": "2019-08-24T14:15:22Z","_create_in_folder": "string","_should_create_usage_dashboard": true}
This endpoint returns a feature flag and its details like name, key, variants, rollout_percentage, and more.
To evaluate and determine the value of a flag for a given user, use the flags endpoint instead.
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
feature_flag:readGET /api /projects /:project_id /feature_flags /:idexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/feature_flags/:id/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
{"id": 0,"name": "string","key": "string","filters": {"property1": null,"property2": null},"deleted": true,"active": true,"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","updated_at": "2019-08-24T14:15:22Z","version": 0,"last_modified_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"},"ensure_experience_continuity": true,"experiment_set": "string","surveys": {"property1": null,"property2": null},"features": {"property1": null,"property2": null},"rollback_conditions": null,"performed_rollback": true,"can_edit": true,"tags": [null],"evaluation_tags": [null],"usage_dashboard": 0,"analytics_dashboards": [0],"has_enriched_analytics": true,"user_access_level": "string","creation_context": "feature_flags","is_remote_configuration": true,"has_encrypted_payloads": true,"status": "string","evaluation_runtime": "server","bucketing_identifier": "distinct_id","last_called_at": "2019-08-24T14:15:22Z","_create_in_folder": "string","_should_create_usage_dashboard": true}
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
feature_flag:write0truePATCH /api /projects /:project_id /feature_flags /:idexport 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/feature_flags/:id/\-d name="string"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.patch("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},data={"name": "string"}).json()
{"id": 0,"name": "string","key": "string","filters": {"property1": null,"property2": null},"deleted": true,"active": true,"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","updated_at": "2019-08-24T14:15:22Z","version": 0,"last_modified_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"},"ensure_experience_continuity": true,"experiment_set": "string","surveys": {"property1": null,"property2": null},"features": {"property1": null,"property2": null},"rollback_conditions": null,"performed_rollback": true,"can_edit": true,"tags": [null],"evaluation_tags": [null],"usage_dashboard": 0,"analytics_dashboards": [0],"has_enriched_analytics": true,"user_access_level": "string","creation_context": "feature_flags","is_remote_configuration": true,"has_encrypted_payloads": true,"status": "string","evaluation_runtime": "server","bucketing_identifier": "distinct_id","last_called_at": "2019-08-24T14:15:22Z","_create_in_folder": "string","_should_create_usage_dashboard": true}
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
feature_flag:write0truePATCH /api /projects /:project_id /feature_flags /:idexport 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/feature_flags/:id/\-d name="string"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.patch("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},data={"name": "string"}).json()
{"id": 0,"name": "string","key": "string","filters": {"property1": null,"property2": null},"deleted": true,"active": true,"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","updated_at": "2019-08-24T14:15:22Z","version": 0,"last_modified_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"},"ensure_experience_continuity": true,"experiment_set": "string","surveys": {"property1": null,"property2": null},"features": {"property1": null,"property2": null},"rollback_conditions": null,"performed_rollback": true,"can_edit": true,"tags": [null],"evaluation_tags": [null],"usage_dashboard": 0,"analytics_dashboards": [0],"has_enriched_analytics": true,"user_access_level": "string","creation_context": "feature_flags","is_remote_configuration": true,"has_encrypted_payloads": true,"status": "string","evaluation_runtime": "server","bucketing_identifier": "distinct_id","last_called_at": "2019-08-24T14:15:22Z","_create_in_folder": "string","_should_create_usage_dashboard": true}
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
feature_flag:writeDELETE /api /projects /:project_id /feature_flags /:idexport 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/feature_flags/:id/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.delete("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},)
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
feature_flag:writeDELETE /api /projects /:project_id /feature_flags /:idexport 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/feature_flags/:id/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.delete("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},)
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
activity_log:read101GET /api /projects /:project_id /feature_flags /:id /activityexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/feature_flags/:id/activity/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/activity/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
{"results": [{"user": "string","activity": "string","scope": "string","item_id": "string","detail": {"id": "string","changes": [{"type": "string","action": "string","field": "string","before": null,"after": null}],"merge": {"type": "string","source": null,"target": null},"trigger": {"job_type": "string","job_id": "string","payload": null},"name": "string","short_id": "string","type": "string"},"created_at": "2019-08-24T14:15:22Z"}],"next": "http://example.com","previous": "http://example.com","total_count": 0}
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
activity_log:read101GET /api /projects /:project_id /feature_flags /:id /activityexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/feature_flags/:id/activity/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/activity/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
{"results": [{"user": "string","activity": "string","scope": "string","item_id": "string","detail": {"id": "string","changes": [{"type": "string","action": "string","field": "string","before": null,"after": null}],"merge": {"type": "string","source": null,"target": null},"trigger": {"job_type": "string","job_id": "string","payload": null},"name": "string","short_id": "string","type": "string"},"created_at": "2019-08-24T14:15:22Z"}],"next": "http://example.com","previous": "http://example.com","total_count": 0}
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
0truePOST /api /projects /:project_id /feature_flags /:id /create_static_cohort_for_flagexport 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/feature_flags/:id/create_static_cohort_for_flag/\-d key="string"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/create_static_cohort_for_flag/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},data={"key": "string"}).json()
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
0truePOST /api /projects /:project_id /feature_flags /:id /create_static_cohort_for_flagexport 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/feature_flags/:id/create_static_cohort_for_flag/\-d key="string"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/create_static_cohort_for_flag/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},data={"key": "string"}).json()
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
0truePOST /api /projects /:project_id /feature_flags /:id /dashboardexport 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/feature_flags/:id/dashboard/\-d key="string"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/dashboard/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},data={"key": "string"}).json()
Create, read, update and delete feature flags. See docs for more information on feature flags.
If you're looking to use feature flags on your application, you can either use our JavaScript Library or our dedicated endpoint to check if feature flags are enabled for a given user.
0truePOST /api /projects /:project_id /feature_flags /:id /dashboardexport 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/feature_flags/:id/dashboard/\-d key="string"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/dashboard/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},data={"key": "string"}).json()
Get other active flags that depend on this flag.
feature_flag:readGET /api /projects /:project_id /feature_flags /:id /dependent_flagsexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/feature_flags/:id/dependent_flags/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/dependent_flags/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Get other active flags that depend on this flag.
feature_flag:readGET /api /projects /:project_id /feature_flags /:id /dependent_flagsexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/feature_flags/:id/dependent_flags/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/feature_flags/{feature_flag_id}/dependent_flags/".format(project_id=project_id,feature_flag_id="<the feature flag id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Questions about this page? or post a community question.