feature_flags

Restore an archived feature flag to the default flag list.

Sets archived to false and changes nothing else. The flag stays disabled; enable it with a separate call. An already-unarchived flag is returned unchanged.

post/api/projects/{project_id}/feature_flags/{id}/unarchive/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/feature_flags/{id}/unarchive/
  • Auth: HTTP bearer

Path parameters

idinteger required

A unique integer value identifying this feature flag.

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Response

idinteger required
namestring

contains the description for the flag (field name name is kept for backwards-compatibility)

keystring required
filtersobject
deletedboolean
activeboolean
archivedboolean

Whether the flag is archived. Archived flags are hidden from the flag list by default and must be disabled (active: false).

created_atstring date-time required
updated_atstring date-time nullable required
versioninteger
ensure_experience_continuityboolean nullable
experiment_setinteger[] required
surveysobject required
featuresobject required
can_editboolean required
usage_dashboardinteger nullable required

Legacy dashboard of saved usage insights for this flag, or null if it has none. Usage charts are on the flag's Usage tab. The API does not create these dashboards.

analytics_dashboardsinteger[]
has_enriched_analyticsboolean nullable
user_access_levelstring nullable required

The effective access level the user has for this object

creation_context'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_configurationboolean nullable
has_encrypted_payloadsboolean nullable
statusstring required

Staleness classification: ACTIVE, STALE, ARCHIVED, DELETED or UNKNOWN. This is not the serving state. Read the active field for that. A disabled flag that is not archived or deleted reports ACTIVE, because disabled flags are not evaluated for staleness.

last_called_atstring date-time nullable required

Last time this feature flag was called (from $feature_flag_called events)

_create_in_folderstring
is_used_in_replay_settingsboolean required

Check if any team gates session recording on this flag, by linked flag or trigger group.

is_eligible_for_experimentboolean required

Whether this flag can back an experiment: multivariate with 2 to 20 variants.

Changes

No recorded changes to this operation across all 1 revision of this API.