openapi: 3.0.3 info: title: PostHog actions feature_flags API version: 1.0.0 description: '' tags: - name: feature_flags paths: /api/projects/{project_id}/feature_flags/: get: operationId: feature_flags_list description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: query name: active schema: type: string enum: - STALE - 'false' - 'true' - in: query name: created_by_id schema: type: string description: The User ID which initially created the feature flag. - in: query name: evaluation_runtime schema: type: string enum: - both - client - server description: Filter feature flags by their evaluation runtime. - in: query name: excluded_properties schema: type: string description: JSON-encoded list of feature flag keys to exclude from the results. - in: query name: has_evaluation_contexts schema: type: string enum: - 'false' - 'true' description: Filter feature flags by presence of evaluation contexts. 'true' returns only flags with at least one evaluation context, 'false' returns only flags without. - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer - $ref: '#/components/parameters/ProjectIdPath' - in: query name: search schema: type: string description: Search by feature flag key or name. Case insensitive. - in: query name: tags schema: type: string description: JSON-encoded list of tag names to filter feature flags by. - in: query name: type schema: type: string enum: - boolean - experiment - multivariant - remote_config tags: - feature_flags security: - PersonalAPIKeyAuth: - feature_flag:read responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedFeatureFlagList' description: '' x-explicit-tags: - feature_flags post: operationId: feature_flags_create description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags requestBody: content: application/json: schema: $ref: '#/components/schemas/FeatureFlagCreateRequestSchema' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/FeatureFlagCreateRequestSchema' multipart/form-data: schema: $ref: '#/components/schemas/FeatureFlagCreateRequestSchema' security: - PersonalAPIKeyAuth: - feature_flag:write responses: '201': content: application/json: schema: $ref: '#/components/schemas/FeatureFlag' description: '' x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/{id}/: get: operationId: feature_flags_retrieve description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags security: - PersonalAPIKeyAuth: - feature_flag:read responses: '200': content: application/json: schema: $ref: '#/components/schemas/FeatureFlag' description: '' x-explicit-tags: - feature_flags put: operationId: feature_flags_update description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags requestBody: content: application/json: schema: $ref: '#/components/schemas/FeatureFlag' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/FeatureFlag' multipart/form-data: schema: $ref: '#/components/schemas/FeatureFlag' required: true security: - PersonalAPIKeyAuth: - feature_flag:write responses: '200': content: application/json: schema: $ref: '#/components/schemas/FeatureFlag' description: '' x-explicit-tags: - feature_flags patch: operationId: feature_flags_partial_update description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedFeatureFlagPartialUpdateRequestSchema' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedFeatureFlagPartialUpdateRequestSchema' multipart/form-data: schema: $ref: '#/components/schemas/PatchedFeatureFlagPartialUpdateRequestSchema' security: - PersonalAPIKeyAuth: - feature_flag:write responses: '200': content: application/json: schema: $ref: '#/components/schemas/FeatureFlag' description: '' x-explicit-tags: - feature_flags delete: operationId: feature_flags_destroy description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags security: - PersonalAPIKeyAuth: - feature_flag:write responses: '405': description: No response body x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/{id}/activity/: get: operationId: feature_flags_activity_retrieve description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - in: query name: limit schema: type: integer minimum: 1 default: 10 description: Number of items per page - in: query name: page schema: type: integer minimum: 1 default: 1 description: Page number - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags security: - PersonalAPIKeyAuth: - activity_log:read responses: '200': content: application/json: schema: $ref: '#/components/schemas/ActivityLogPaginatedResponse' description: '' '404': description: No response body x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/{id}/create_static_cohort_for_flag/: post: operationId: feature_flags_create_static_cohort_for_flag_create description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags requestBody: content: application/json: schema: $ref: '#/components/schemas/FeatureFlag' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/FeatureFlag' multipart/form-data: schema: $ref: '#/components/schemas/FeatureFlag' required: true responses: '200': description: No response body x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/{id}/dashboard/: post: operationId: feature_flags_dashboard_create description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags requestBody: content: application/json: schema: $ref: '#/components/schemas/FeatureFlag' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/FeatureFlag' multipart/form-data: schema: $ref: '#/components/schemas/FeatureFlag' required: true responses: '200': description: No response body x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/{id}/dependent_flags/: get: operationId: feature_flags_dependent_flags_list description: Get other active flags that depend on this flag. parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags security: - PersonalAPIKeyAuth: - feature_flag:read responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/DependentFlag' description: '' x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/{id}/enrich_usage_dashboard/: post: operationId: feature_flags_enrich_usage_dashboard_create description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags requestBody: content: application/json: schema: $ref: '#/components/schemas/FeatureFlag' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/FeatureFlag' multipart/form-data: schema: $ref: '#/components/schemas/FeatureFlag' required: true responses: '200': description: No response body x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/{id}/remote_config/: get: operationId: feature_flags_remote_config_retrieve description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags security: - PersonalAPIKeyAuth: - feature_flag:read responses: '200': description: No response body x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/{id}/status/: get: operationId: feature_flags_status_retrieve description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags security: - PersonalAPIKeyAuth: - feature_flag:read responses: '200': content: application/json: schema: $ref: '#/components/schemas/FeatureFlagStatusResponse' description: '' x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/{id}/versions/{version_number}/: get: operationId: feature_flags_versions_retrieve description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this feature flag. required: true - $ref: '#/components/parameters/ProjectIdPath' - in: path name: version_number schema: type: integer description: The version number to reconstruct. required: true tags: - feature_flags security: - PersonalAPIKeyAuth: - feature_flag:read responses: '200': content: application/json: schema: $ref: '#/components/schemas/FeatureFlagVersionResponse' description: '' '400': description: Version history is not available for remote configuration flags. '404': description: Version not found. '422': description: Activity log incomplete; cannot reconstruct this version. x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/activity/: get: operationId: feature_flags_all_activity_retrieve description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: query name: limit schema: type: integer minimum: 1 default: 10 description: Number of items per page - in: query name: page schema: type: integer minimum: 1 default: 1 description: Page number - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags security: - PersonalAPIKeyAuth: - activity_log:read responses: '200': content: application/json: schema: $ref: '#/components/schemas/ActivityLogPaginatedResponse' description: '' x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/bulk_delete/: post: operationId: feature_flags_bulk_delete_create description: 'Bulk delete feature flags by filter criteria or explicit IDs. Accepts either: - {"filters": {...}} - Same filter params as list endpoint (search, active, type, etc.) - {"ids": [...]} - Explicit list of flag IDs (no limit) Returns same format as bulk_delete for UI compatibility. Uses bulk operations for efficiency: database updates are batched and cache invalidation happens once at the end rather than per-flag.' parameters: - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags requestBody: content: application/json: schema: $ref: '#/components/schemas/FeatureFlag' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/FeatureFlag' multipart/form-data: schema: $ref: '#/components/schemas/FeatureFlag' required: true security: - PersonalAPIKeyAuth: - feature_flag:write responses: '200': description: No response body x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/bulk_keys/: post: operationId: feature_flags_bulk_keys_create description: 'Get feature flag keys by IDs. Accepts a list of feature flag IDs and returns a mapping of ID to key.' parameters: - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags requestBody: content: application/json: schema: $ref: '#/components/schemas/FeatureFlag' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/FeatureFlag' multipart/form-data: schema: $ref: '#/components/schemas/FeatureFlag' required: true responses: '200': description: No response body x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/bulk_update_tags/: post: operationId: feature_flags_bulk_update_tags_create description: 'Bulk update tags on multiple objects. Accepts: - {"ids": [...], "action": "add"|"remove"|"set", "tags": ["tag1", "tag2"]} Actions: - "add": Add tags to existing tags on each object - "remove": Remove specific tags from each object - "set": Replace all tags on each object with the provided list' parameters: - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags requestBody: content: application/json: schema: $ref: '#/components/schemas/BulkUpdateTagsRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/BulkUpdateTagsRequest' multipart/form-data: schema: $ref: '#/components/schemas/BulkUpdateTagsRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/BulkUpdateTagsResponse' description: '' x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/evaluation_reasons/: get: operationId: feature_flags_evaluation_reasons_retrieve description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: query name: distinct_id schema: type: string minLength: 1 description: User distinct ID required: true - in: query name: groups schema: type: string default: '{}' description: Groups for feature flag evaluation (JSON object string) - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags security: - PersonalAPIKeyAuth: - feature_flag:read responses: '200': description: No response body x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/local_evaluation/: get: operationId: feature_flags_local_evaluation_retrieve description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - $ref: '#/components/parameters/ProjectIdPath' - in: query name: send_cohorts schema: type: boolean nullable: true default: false description: Include cohorts in response tags: - feature_flags security: - PersonalAPIKeyAuth: - feature_flag:read responses: '200': content: application/json: schema: $ref: '#/components/schemas/LocalEvaluationResponse' description: '' '402': description: Payment required '500': description: Internal server error x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/matching_ids/: get: operationId: feature_flags_matching_ids_retrieve description: 'Get IDs of all feature flags matching the current filters. Uses the same filtering logic as the list endpoint. Returns only IDs that the user has permission to edit.' parameters: - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags security: - PersonalAPIKeyAuth: - feature_flag:read responses: '200': description: No response body x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/my_flags/: get: operationId: feature_flags_my_flags_retrieve description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - in: query name: groups schema: type: string default: '{}' description: Groups for feature flag evaluation (JSON object string) - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags security: - PersonalAPIKeyAuth: - feature_flag:read responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/MyFlagsResponse' description: '' x-explicit-tags: - feature_flags /api/projects/{project_id}/feature_flags/user_blast_radius/: post: operationId: feature_flags_user_blast_radius_create description: 'Create, read, update and delete feature flags. [See docs](https://posthog.com/docs/feature-flags) 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.' parameters: - $ref: '#/components/parameters/ProjectIdPath' tags: - feature_flags requestBody: content: application/json: schema: $ref: '#/components/schemas/UserBlastRadiusRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/UserBlastRadiusRequest' multipart/form-data: schema: $ref: '#/components/schemas/UserBlastRadiusRequest' required: true security: - PersonalAPIKeyAuth: - feature_flag:read responses: '200': content: application/json: schema: $ref: '#/components/schemas/UserBlastRadiusResponse' description: '' x-explicit-tags: - feature_flags components: schemas: BulkUpdateTagsResponse: type: object properties: updated: type: array items: $ref: '#/components/schemas/BulkUpdateTagsItem' skipped: type: array items: $ref: '#/components/schemas/BulkUpdateTagsError' required: - skipped - updated FeatureFlagFilterPropertyMultiContainsSchemaOperatorEnum: enum: - icontains_multi - not_icontains_multi type: string description: '* `icontains_multi` - icontains_multi * `not_icontains_multi` - not_icontains_multi' FeatureFlagFilterPropertySemverSchema: type: object properties: key: type: string description: Property key used in this feature flag condition. type: allOf: - $ref: '#/components/schemas/PropertyGroupTypeEnum' description: 'Property filter type. Common values are ''person'' and ''cohort''. * `cohort` - cohort * `person` - person * `group` - group' cohort_name: type: string nullable: true description: Resolved cohort name for cohort-type filters. group_type_index: type: integer nullable: true description: Group type index when using group-based filters. operator: allOf: - $ref: '#/components/schemas/FeatureFlagFilterPropertySemverSchemaOperatorEnum' description: 'Semantic version comparison operator. * `semver_gt` - semver_gt * `semver_gte` - semver_gte * `semver_lt` - semver_lt * `semver_lte` - semver_lte * `semver_eq` - semver_eq * `semver_neq` - semver_neq * `semver_tilde` - semver_tilde * `semver_caret` - semver_caret * `semver_wildcard` - semver_wildcard' value: type: string description: Semantic version string. required: - key - operator - value FeatureFlagFilterPropertyCohortInSchemaOperatorEnum: enum: - in - not_in type: string description: '* `in` - in * `not_in` - not_in' RoleAtOrganizationEnum: enum: - engineering - data - product - founder - leadership - marketing - sales - other type: string description: '* `engineering` - Engineering * `data` - Data * `product` - Product Management * `founder` - Founder * `leadership` - Leadership * `marketing` - Marketing * `sales` - Sales / Success * `other` - Other' FeatureFlagCreateRequestSchema: type: object properties: key: type: string description: Feature flag key. name: type: string description: Feature flag description (stored in the `name` field for backwards compatibility). filters: allOf: - $ref: '#/components/schemas/FeatureFlagFiltersSchema' description: Feature flag targeting configuration. active: type: boolean description: Whether the feature flag is active. tags: type: array items: type: string description: Organizational tags for this feature flag. evaluation_contexts: type: array items: type: string description: Evaluation contexts that control where this flag evaluates at runtime. Change: type: object properties: type: type: string readOnly: true action: type: string readOnly: true field: type: string readOnly: true before: readOnly: true after: readOnly: true required: - action - after - before - field - type NullEnum: enum: - null FeatureFlagFilterPropertyExistsSchema: type: object properties: key: type: string description: Property key used in this feature flag condition. type: allOf: - $ref: '#/components/schemas/PropertyGroupTypeEnum' description: 'Property filter type. Common values are ''person'' and ''cohort''. * `cohort` - cohort * `person` - person * `group` - group' cohort_name: type: string nullable: true description: Resolved cohort name for cohort-type filters. group_type_index: type: integer nullable: true description: Group type index when using group-based filters. operator: allOf: - $ref: '#/components/schemas/ExistenceOperatorEnum' description: 'Existence operator. * `is_set` - is_set * `is_not_set` - is_not_set' value: description: Optional value. Runtime behavior determines whether this is ignored. required: - key - operator PaginatedFeatureFlagList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/FeatureFlag' FeatureFlagConditionGroupSchema: type: object properties: properties: type: array items: $ref: '#/components/schemas/FeatureFlagFilterPropertySchema' description: Property conditions for this release condition group. rollout_percentage: type: number format: double description: Rollout percentage for this release condition group. variant: type: string nullable: true description: Variant key override for multivariate flags. aggregation_group_type_index: type: integer nullable: true description: Group type index for this condition set. None means person-level aggregation. UserBlastRadiusResponse: type: object properties: affected: type: integer description: Number of entities matching the condition (users or groups depending on group_type_index) total: type: integer description: Total number of entities of this type in the project required: - affected - total UserBasic: type: object properties: id: type: integer readOnly: true uuid: type: string format: uuid readOnly: true distinct_id: type: string nullable: true maxLength: 200 first_name: type: string maxLength: 150 last_name: type: string maxLength: 150 email: type: string format: email title: Email address maxLength: 254 is_email_verified: type: boolean nullable: true hedgehog_config: type: object additionalProperties: true nullable: true readOnly: true role_at_organization: nullable: true oneOf: - $ref: '#/components/schemas/RoleAtOrganizationEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' required: - email - hedgehog_config - id - uuid ActionEnum: enum: - add - remove - set type: string description: '* `add` - add * `remove` - remove * `set` - set' ActivityLogEntry: type: object properties: id: type: string format: uuid readOnly: true user: type: object nullable: true readOnly: true activity: type: string readOnly: true scope: type: string readOnly: true item_id: type: string readOnly: true detail: $ref: '#/components/schemas/Detail' created_at: type: string format: date-time readOnly: true required: - activity - created_at - id - item_id - scope - user PropertyGroupTypeEnum: enum: - cohort - person - group type: string description: '* `cohort` - cohort * `person` - person * `group` - group' ExistenceOperatorEnum: enum: - is_set - is_not_set type: string description: '* `is_set` - is_set * `is_not_set` - is_not_set' BulkUpdateTagsRequest: type: object properties: ids: type: array items: type: integer description: List of object IDs to update tags on. maxItems: 500 action: allOf: - $ref: '#/components/schemas/ActionEnum' description: '''add'' merges with existing tags, ''remove'' deletes specific tags, ''set'' replaces all tags. * `add` - add * `remove` - remove * `set` - set' tags: type: array items: type: string description: Tag names to add, remove, or set. required: - action - ids - tags DependentFlag: type: object properties: id: type: integer description: Feature flag ID key: type: string description: Feature flag key name: type: string description: Feature flag name required: - id - key - name PatchedFeatureFlagPartialUpdateRequestSchema: type: object properties: key: type: string description: Feature flag key. name: type: string description: Feature flag description (stored in the `name` field for backwards compatibility). filters: allOf: - $ref: '#/components/schemas/FeatureFlagFiltersSchema' description: Feature flag targeting configuration. active: type: boolean description: Whether the feature flag is active. tags: type: array items: type: string description: Organizational tags for this feature flag. evaluation_contexts: type: array items: type: string description: Evaluation contexts that control where this flag evaluates at runtime. FeatureFlagFilterPropertyMultiContainsSchema: type: object properties: key: type: string description: Property key used in this feature flag condition. type: allOf: - $ref: '#/components/schemas/PropertyGroupTypeEnum' description: 'Property filter type. Common values are ''person'' and ''cohort''. * `cohort` - cohort * `person` - person * `group` - group' cohort_name: type: string nullable: true description: Resolved cohort name for cohort-type filters. group_type_index: type: integer nullable: true description: Group type index when using group-based filters. operator: allOf: - $ref: '#/components/schemas/FeatureFlagFilterPropertyMultiContainsSchemaOperatorEnum' description: 'Multi-contains operator. * `icontains_multi` - icontains_multi * `not_icontains_multi` - not_icontains_multi' value: type: array items: type: string description: List of strings to evaluate against. required: - key - operator - value Trigger: type: object properties: job_type: type: string readOnly: true job_id: type: string readOnly: true payload: readOnly: true required: - job_id - job_type - payload MyFlagsResponse: type: object properties: feature_flag: $ref: '#/components/schemas/MinimalFeatureFlag' value: {} required: - feature_flag - value FeatureFlagFilterPropertyFlagEvaluatesSchema: type: object properties: key: type: string description: Property key used in this feature flag condition. type: allOf: - $ref: '#/components/schemas/FeatureFlagFilterPropertyFlagEvaluatesSchemaTypeEnum' description: 'Flag property type required for flag dependency checks. * `flag` - flag' cohort_name: type: string nullable: true description: Resolved cohort name for cohort-type filters. group_type_index: type: integer nullable: true description: Group type index when using group-based filters. operator: allOf: - $ref: '#/components/schemas/FeatureFlagFilterPropertyFlagEvaluatesSchemaOperatorEnum' description: 'Operator for feature flag dependency evaluation. * `flag_evaluates_to` - flag_evaluates_to' value: description: Value to compare flag evaluation against. required: - key - operator - type - value LocalEvaluationResponse: type: object properties: flags: type: array items: $ref: '#/components/schemas/MinimalFeatureFlag' group_type_mapping: type: object additionalProperties: type: string cohorts: type: object additionalProperties: true description: Cohort definitions keyed by cohort ID. Each value is a property group structure with 'type' (OR/AND) and 'values' (array of property groups or property filters). required: - cohorts - flags - group_type_mapping EvaluationRuntimeEnum: enum: - server - client - all type: string description: '* `server` - Server * `client` - Client * `all` - All' FeatureFlagFilterPropertyCohortInSchemaTypeEnum: enum: - cohort type: string description: '* `cohort` - cohort' MinimalFeatureFlag: type: object properties: id: type: integer readOnly: true team_id: type: integer readOnly: true name: type: string key: type: string maxLength: 400 filters: type: object additionalProperties: true deleted: type: boolean active: type: boolean ensure_experience_continuity: type: boolean nullable: true has_encrypted_payloads: type: boolean nullable: true version: type: integer maximum: 2147483647 minimum: -2147483648 nullable: true evaluation_runtime: nullable: true description: 'Specifies where this feature flag should be evaluated * `server` - Server * `client` - Client * `all` - All' oneOf: - $ref: '#/components/schemas/EvaluationRuntimeEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' bucketing_identifier: nullable: true description: 'Identifier used for bucketing users into rollout and variants * `distinct_id` - User ID (default) * `device_id` - Device ID' oneOf: - $ref: '#/components/schemas/BucketingIdentifierEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' evaluation_contexts: type: array items: type: string readOnly: true required: - evaluation_contexts - id - key - team_id Detail: type: object properties: id: type: string readOnly: true changes: type: array items: $ref: '#/components/schemas/Change' merge: $ref: '#/components/schemas/Merge' trigger: $ref: '#/components/schemas/Trigger' name: type: string readOnly: true short_id: type: string readOnly: true type: type: string readOnly: true required: - id - name - short_id - type FeatureFlagFilterPropertySchema: oneOf: - $ref: '#/components/schemas/FeatureFlagFilterPropertyGenericSchema' - $ref: '#/components/schemas/FeatureFlagFilterPropertyExistsSchema' - $ref: '#/components/schemas/FeatureFlagFilterPropertyDateSchema' - $ref: '#/components/schemas/FeatureFlagFilterPropertySemverSchema' - $ref: '#/components/schemas/FeatureFlagFilterPropertyMultiContainsSchema' - $ref: '#/components/schemas/FeatureFlagFilterPropertyCohortInSchema' - $ref: '#/components/schemas/FeatureFlagFilterPropertyFlagEvaluatesSchema' FeatureFlagStatusResponse: type: object properties: status: type: string description: 'Flag status: active, stale, deleted, or unknown' reason: type: string description: Human-readable explanation of the status required: - reason - status FeatureFlagFilterPropertySemverSchemaOperatorEnum: enum: - semver_gt - semver_gte - semver_lt - semver_lte - semver_eq - semver_neq - semver_tilde - semver_caret - semver_wildcard type: string description: '* `semver_gt` - semver_gt * `semver_gte` - semver_gte * `semver_lt` - semver_lt * `semver_lte` - semver_lte * `semver_eq` - semver_eq * `semver_neq` - semver_neq * `semver_tilde` - semver_tilde * `semver_caret` - semver_caret * `semver_wildcard` - semver_wildcard' FeatureFlagMultivariateSchema: type: object properties: variants: type: array items: $ref: '#/components/schemas/FeatureFlagMultivariateVariantSchema' description: Variant definitions for multivariate feature flags. required: - variants FeatureFlagFiltersSchema: type: object properties: groups: type: array items: $ref: '#/components/schemas/FeatureFlagConditionGroupSchema' description: Release condition groups for the feature flag. multivariate: allOf: - $ref: '#/components/schemas/FeatureFlagMultivariateSchema' nullable: true description: Multivariate configuration for variant-based rollouts. aggregation_group_type_index: type: integer nullable: true description: Group type index for group-based feature flags. payloads: type: object additionalProperties: type: string description: Optional payload values keyed by variant key. super_groups: type: array items: type: object additionalProperties: true description: Additional super condition groups used by experiments. feature_enrollment: type: boolean nullable: true description: Whether this flag has early access feature enrollment enabled. When true, the flag is evaluated against the person property $feature_enrollment/{flag_key}. FeatureFlagFilterPropertyFlagEvaluatesSchemaTypeEnum: enum: - flag type: string description: '* `flag` - flag' FeatureFlagFilterPropertyGenericSchema: type: object properties: key: type: string description: Property key used in this feature flag condition. type: allOf: - $ref: '#/components/schemas/PropertyGroupTypeEnum' description: 'Property filter type. Common values are ''person'' and ''cohort''. * `cohort` - cohort * `person` - person * `group` - group' cohort_name: type: string nullable: true description: Resolved cohort name for cohort-type filters. group_type_index: type: integer nullable: true description: Group type index when using group-based filters. value: description: Comparison value for the property filter. Supports strings, numbers, booleans, and arrays. operator: allOf: - $ref: '#/components/schemas/FeatureFlagFilterPropertyGenericSchemaOperatorEnum' description: 'Operator used to compare the property value. * `exact` - exact * `is_not` - is_not * `icontains` - icontains * `not_icontains` - not_icontains * `regex` - regex * `not_regex` - not_regex * `gt` - gt * `gte` - gte * `lt` - lt * `lte` - lte' required: - key - operator - value Merge: type: object properties: type: type: string readOnly: true source: readOnly: true target: readOnly: true required: - source - target - type BulkUpdateTagsItem: type: object properties: id: type: integer tags: type: array items: type: string required: - id - tags FeatureFlagFilterPropertyFlagEvaluatesSchemaOperatorEnum: enum: - flag_evaluates_to type: string description: '* `flag_evaluates_to` - flag_evaluates_to' BlankEnum: enum: - '' FeatureFlagFilterPropertyCohortInSchema: type: object properties: key: type: string description: Property key used in this feature flag condition. type: allOf: - $ref: '#/components/schemas/FeatureFlagFilterPropertyCohortInSchemaTypeEnum' description: 'Cohort property type required for in/not_in operators. * `cohort` - cohort' cohort_name: type: string nullable: true description: Resolved cohort name for cohort-type filters. group_type_index: type: integer nullable: true description: Group type index when using group-based filters. operator: allOf: - $ref: '#/components/schemas/FeatureFlagFilterPropertyCohortInSchemaOperatorEnum' description: 'Membership operator for cohort properties. * `in` - in * `not_in` - not_in' value: description: Cohort comparison value (single or list, depending on usage). required: - key - operator - type - value UserBlastRadiusRequest: type: object properties: condition: type: object additionalProperties: true description: The release condition to evaluate group_type_index: type: integer nullable: true description: Group type index for group-based flags (null for person-based flags) required: - condition ActivityLogPaginatedResponse: type: object description: Response shape for paginated activity log endpoints. properties: results: type: array items: $ref: '#/components/schemas/ActivityLogEntry' next: type: string format: uri nullable: true previous: type: string format: uri nullable: true total_count: type: integer required: - next - previous - results - total_count FeatureFlagFilterPropertyGenericSchemaOperatorEnum: enum: - exact - is_not - icontains - not_icontains - regex - not_regex - gt - gte - lt - lte type: string description: '* `exact` - exact * `is_not` - is_not * `icontains` - icontains * `not_icontains` - not_icontains * `regex` - regex * `not_regex` - not_regex * `gt` - gt * `gte` - gte * `lt` - lt * `lte` - lte' FeatureFlagFilterPropertyDateSchema: type: object properties: key: type: string description: Property key used in this feature flag condition. type: allOf: - $ref: '#/components/schemas/PropertyGroupTypeEnum' description: 'Property filter type. Common values are ''person'' and ''cohort''. * `cohort` - cohort * `person` - person * `group` - group' cohort_name: type: string nullable: true description: Resolved cohort name for cohort-type filters. group_type_index: type: integer nullable: true description: Group type index when using group-based filters. operator: allOf: - $ref: '#/components/schemas/DateOperatorEnum' description: 'Date comparison operator. * `is_date_exact` - is_date_exact * `is_date_after` - is_date_after * `is_date_before` - is_date_before' value: type: string description: Date value in ISO format or relative date expression. required: - key - operator - value FeatureFlagVersionResponse: type: object description: Feature flag state at a given version plus reconstruction metadata. properties: id: type: integer readOnly: true key: type: string maxLength: 400 name: type: string filters: type: object additionalProperties: true readOnly: true active: type: boolean deleted: type: boolean version: type: integer maximum: 2147483647 minimum: -2147483648 nullable: true rollback_conditions: nullable: true performed_rollback: type: boolean nullable: true ensure_experience_continuity: type: boolean nullable: true has_enriched_analytics: type: boolean nullable: true is_remote_configuration: type: boolean nullable: true has_encrypted_payloads: type: boolean nullable: true evaluation_runtime: nullable: true description: 'Specifies where this feature flag should be evaluated * `server` - Server * `client` - Client * `all` - All' oneOf: - $ref: '#/components/schemas/EvaluationRuntimeEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' bucketing_identifier: nullable: true description: 'Identifier used for bucketing users into rollout and variants * `distinct_id` - User ID (default) * `device_id` - Device ID' oneOf: - $ref: '#/components/schemas/BucketingIdentifierEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' last_called_at: type: string format: date-time nullable: true description: Last time this feature flag was called (from $feature_flag_called events) created_at: type: string format: date-time created_by: type: integer readOnly: true nullable: true is_historical: type: boolean readOnly: true description: False for the current version; true for reconstructed historical versions. version_timestamp: type: string format: date-time readOnly: true nullable: true modified_by: type: integer readOnly: true nullable: true description: User from the activity log entry that produced this version. required: - created_by - filters - id - is_historical - key - modified_by - version_timestamp BulkUpdateTagsError: type: object properties: id: type: integer reason: type: string required: - id - reason BucketingIdentifierEnum: enum: - distinct_id - device_id type: string description: '* `distinct_id` - User ID (default) * `device_id` - Device ID' FeatureFlagMultivariateVariantSchema: type: object properties: key: type: string description: Unique key for this variant. name: type: string description: Human-readable name for this variant. rollout_percentage: type: number format: double description: Variant rollout percentage. required: - key - rollout_percentage FeatureFlag: type: object description: Serializer mixin that handles tags for objects. properties: id: type: integer readOnly: true name: type: string description: contains the description for the flag (field name `name` is kept for backwards-compatibility) key: type: string maxLength: 400 filters: type: object additionalProperties: true deleted: type: boolean active: type: boolean created_by: allOf: - $ref: '#/components/schemas/UserBasic' readOnly: true created_at: type: string format: date-time updated_at: type: string format: date-time readOnly: true nullable: true version: type: integer default: 0 last_modified_by: allOf: - $ref: '#/components/schemas/UserBasic' readOnly: true ensure_experience_continuity: type: boolean nullable: true experiment_set: type: array items: type: integer readOnly: true experiment_set_metadata: type: array items: type: object additionalProperties: true readOnly: true surveys: type: object additionalProperties: true readOnly: true features: type: object additionalProperties: true readOnly: true rollback_conditions: nullable: true performed_rollback: type: boolean nullable: true can_edit: type: boolean readOnly: true tags: type: array items: {} evaluation_contexts: type: array items: {} writeOnly: true usage_dashboard: type: integer readOnly: true analytics_dashboards: type: array items: type: integer has_enriched_analytics: type: boolean nullable: true user_access_level: type: string nullable: true readOnly: true description: The effective access level the user has for this object creation_context: allOf: - $ref: '#/components/schemas/FeatureFlagCreationContextEnum' writeOnly: true description: 'Indicates the origin product of the feature flag. Choices: ''feature_flags'', ''experiments'', ''surveys'', ''early_access_features'', ''web_experiments'', ''product_tours''. * `feature_flags` - feature_flags * `experiments` - experiments * `surveys` - surveys * `early_access_features` - early_access_features * `web_experiments` - web_experiments * `product_tours` - product_tours' is_remote_configuration: type: boolean nullable: true has_encrypted_payloads: type: boolean nullable: true status: type: string readOnly: true evaluation_runtime: nullable: true description: 'Specifies where this feature flag should be evaluated * `server` - Server * `client` - Client * `all` - All' oneOf: - $ref: '#/components/schemas/EvaluationRuntimeEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' bucketing_identifier: nullable: true description: 'Identifier used for bucketing users into rollout and variants * `distinct_id` - User ID (default) * `device_id` - Device ID' oneOf: - $ref: '#/components/schemas/BucketingIdentifierEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' last_called_at: type: string format: date-time nullable: true description: Last time this feature flag was called (from $feature_flag_called events) _create_in_folder: type: string writeOnly: true title: ' create in folder' _should_create_usage_dashboard: type: boolean writeOnly: true default: true title: ' should create usage dashboard' is_used_in_replay_settings: type: boolean description: Check if this feature flag is used in any team's session recording linked flag setting. readOnly: true required: - can_edit - created_by - experiment_set - experiment_set_metadata - features - id - is_used_in_replay_settings - key - last_modified_by - status - surveys - updated_at - usage_dashboard - user_access_level DateOperatorEnum: enum: - is_date_exact - is_date_before - is_date_after type: string description: '* `is_date_exact` - is_date_exact * `is_date_before` - is_date_before * `is_date_after` - is_date_after' FeatureFlagCreationContextEnum: enum: - feature_flags - experiments - surveys - early_access_features - web_experiments - product_tours type: string description: '* `feature_flags` - feature_flags * `experiments` - experiments * `surveys` - surveys * `early_access_features` - early_access_features * `web_experiments` - web_experiments * `product_tours` - product_tours' parameters: ProjectIdPath: in: path name: project_id required: true schema: type: string description: Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. securitySchemes: PersonalAPIKeyAuth: type: http scheme: bearer x-tagGroups: - name: All endpoints tags: - LLM Analytics - actions - activity_log - activity_logs - advanced_activity_logs - alerts - annotations - approval_policies - batch_exports - cdp - change_requests - code - code-invites - cohorts - comments - conversations - core - customer_analytics - customer_journeys - customer_profile_configs - dashboard_templates - dashboards - data_color_themes - data_modeling_jobs - data_warehouse - dataset_items - datasets - desktop_recordings - domains - early_access_feature - early_access_features - elements - endpoints - environments - error_tracking - evaluation_runs - evaluations - event_definitions - event_filter - event_schemas - events - experiment_holdouts - experiment_saved_metrics - experiments - exports - external_data_schemas - external_data_sources - feature_flags - file_system - file_system_shortcut - flag_value - groups - groups_types - health_issues - heatmap_screenshots - heatmaps - hog_flows - hog_function_templates - hog_functions - insight_variables - insights - integrations - invites - js-snippet - legal_documents - lineage - live_debugger_breakpoints - llm_analytics - llm_prompts - llm_skills - logs - managed_viewsets - max - max_tools - mcp_server_installations - mcp_servers - mcp_store - mcp_tools - members - notebooks - oauth_applications - object_media_previews - organizations - persisted_folder - persons - platform_features - plugin_configs - product_analytics - product_tours - project_secret_api_keys - projects - property_definitions - proxy_records - public_hog_function_templates - query - replay - reverse_proxy - role_external_references - roles - sandbox-environments - sandbox_environments - saved - schema_property_groups - sdk_doctor - session_group_summaries - session_recording_playlists - session_recordings - session_summaries - sessions - signals - subscriptions - surveys - taggers - task-automations - task-runs - task_automations - tasks - uploaded_media - user_home_settings - user_interviews - users - visual_review - warehouse_dag - warehouse_model_paths - warehouse_saved_queries - warehouse_saved_query_folders - warehouse_tables - warehouse_view_link - warehouse_view_links - web_analytics - web_experiments - web_vitals - welcome - workflows