v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
Feature flags

Get feature flag

Get a single feature flag by key. By default, this returns the configurations for all environments. You can filter environments with the env query parameter. For example, setting env=production restricts the returned configurations to just the production environment.

Recommended use

This endpoint can return a large amount of information. Specifying one or multiple environments with the env parameter can decrease response time and overall payload size. We recommend using this parameter to return only the environments relevant to your query.

Expanding response

LaunchDarkly supports the expand query param to include additional fields in the response, with the following fields:

  • evaluation includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days
  • migrationSettings includes migration settings information within the flag and within returned environments. These settings are only included for migration flags, that is, where purpose is migration.

For example, expand=evaluation includes the evaluation field in the response.

get/api/v2/flags/{projectKey}/{featureFlagKey}

Path parameters

projectKeystring string required

The project key

The project key

featureFlagKeystring string required

The feature flag key

The feature flag key

Query parameters

envstring string

Filter configurations by environment

Filter configurations by environment

expandstring string

A comma-separated list of fields to expand in the response. Supported fields are explained above.

A comma-separated list of fields to expand in the response. Supported fields are explained above.

Response

Global flag response

namestring required

A human-friendly name for the feature flag

kind'boolean' | 'multivariate' required

Kind of feature flag

descriptionstring

Description of the feature flag

keystring required

A unique key used to reference the flag in your code

_versioninteger required

Version of the feature flag

creationDateinteger required
includeInSnippetboolean

Deprecated, use <code>clientSideAvailability</code>. Whether this flag should be made available to the client-side JavaScript SDK

temporaryboolean required

Whether the flag is a temporary flag

tagsstring[] required

Tags for the feature flag

_linksobject required

The location and content type of related resources

maintainerIdstring

Associated maintainerId for the feature flag

maintainerTeamKeystring

The key of the associated team that maintains this feature flag

goalIdsstring[]

Deprecated, use <code>experiments</code> instead

customPropertiesCustomProperties required
archivedboolean required

Boolean indicating if the feature flag is archived

archivedDateinteger
deprecatedboolean

Boolean indicating if the feature flag is deprecated

deprecatedDateinteger
_purposestring
environmentsobject

Details on the environments for this flag. Only returned if the request is filtered by environment, using the <code>filterEnv</code> query parameter.