# LaunchDarkly (/integrations/launchdarkly)





{/* MANUAL-CONTENT-START:intro */}

Use [LaunchDarkly](https://launchdarkly.com/) to list, create, update, toggle, and delete feature flags, and inspect their environment-specific status. Toggling uses LaunchDarkly's semantic patch API.

Read projects, environments, segments, members, and audit logs to find targeting context or review changes. For example, toggle a flag after a deployment, then inspect its status and the resulting audit entry.

## Authentication [#authentication]

Create a personal access token or service token under **Organization settings > Authorization > Tokens** in LaunchDarkly. Sim sends it directly in the `Authorization` header, without a `Bearer` prefix. Grant only the access the workflow needs. [Service tokens are available on selected plans](https://launchdarkly.com/docs/home/account/api); SDK keys cannot authenticate REST API requests.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

List, create, update, toggle, and delete feature flags. Read projects, environments, segments, members, and audit logs. Requires an API key.

## Actions [#actions]

### LaunchDarkly Create Flag [#launchdarkly-create-flag]

Create a new feature flag in a LaunchDarkly project.

<ReferenceDetails>
  #### Input [#input]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `projectKey` | string | Yes | The project key to create the flag in |
  | `name` | string | Yes | Human-readable name for the feature flag |
  | `key` | string | Yes | Unique key for the feature flag (used in code) |
  | `description` | string | No | Description of the feature flag |
  | `tags` | string | No | Comma-separated list of tags |
  | `temporary` | boolean | No | Whether the flag is temporary (default true) |

  #### Output [#output]

  | Parameter | Type | Description |
  | - | - | - |
  | `key` | string | The unique key of the feature flag |
  | `name` | string | The human-readable name of the feature flag |
  | `kind` | string | The type of flag (boolean or multivariate) |
  | `description` | string | Description of the feature flag |
  | `temporary` | boolean | Whether the flag is temporary |
  | `archived` | boolean | Whether the flag is archived |
  | `deprecated` | boolean | Whether the flag is deprecated |
  | `creationDate` | number | Unix timestamp in milliseconds when the flag was created |
  | `tags` | array | Tags applied to the flag |
  | `variations` | array | The variations for this feature flag |
  | ↳ `value` | string | The variation value (any JSON type, shown as text) |
  | ↳ `name` | string | The variation name |
  | ↳ `description` | string | The variation description |
  | `maintainerId` | string | The ID of the member who maintains this flag |
  | `maintainerEmail` | string | The email of the member who maintains this flag |
</ReferenceDetails>

### LaunchDarkly Delete Flag [#launchdarkly-delete-flag]

Delete a feature flag from a LaunchDarkly project.

<ReferenceDetails>
  #### Input [#input-1]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `projectKey` | string | Yes | The project key |
  | `flagKey` | string | Yes | The feature flag key to delete |

  #### Output [#output-1]

  | Parameter | Type | Description |
  | - | - | - |
  | `deleted` | boolean | Whether the flag was successfully deleted |
</ReferenceDetails>

### LaunchDarkly Get Audit Log [#launchdarkly-get-audit-log]

List audit log entries from your LaunchDarkly account.

<ReferenceDetails>
  #### Input [#input-2]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `limit` | number | No | Maximum number of entries to return (default 10, max 20) |
  | `spec` | string | No | Resource specifier filter (e.g. "proj/&#x2A;:env/*:flag/\*" for all flag changes, or "proj/default:env/production:flag/my-flag" for one flag in one environment) |

  #### Output [#output-2]

  | Parameter | Type | Description |
  | - | - | - |
  | `entries` | array | List of audit log entries |
  | ↳ `id` | string | The audit log entry ID |
  | ↳ `date` | number | Unix timestamp in milliseconds |
  | ↳ `kind` | string | The type of action performed |
  | ↳ `name` | string | The name of the resource acted on |
  | ↳ `description` | string | Full description of the action |
  | ↳ `shortDescription` | string | Short description of the action |
  | ↳ `memberEmail` | string | Email of the member who performed the action |
  | ↳ `targetName` | string | Name of the target resource |
  | ↳ `targetKind` | string | Resource specifier of the target (e.g. proj/default:env/production:flag/my-flag) |
  | `totalCount` | number | Total number of audit log entries |
</ReferenceDetails>

### LaunchDarkly Get Flag [#launchdarkly-get-flag]

Get a single feature flag by key from a LaunchDarkly project.

<ReferenceDetails>
  #### Input [#input-3]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `projectKey` | string | Yes | The project key |
  | `flagKey` | string | Yes | The feature flag key |
  | `environmentKey` | string | No | Filter flag configuration to a specific environment |

  #### Output [#output-3]

  | Parameter | Type | Description |
  | - | - | - |
  | `key` | string | The unique key of the feature flag |
  | `name` | string | The human-readable name of the feature flag |
  | `kind` | string | The type of flag (boolean or multivariate) |
  | `description` | string | Description of the feature flag |
  | `temporary` | boolean | Whether the flag is temporary |
  | `archived` | boolean | Whether the flag is archived |
  | `deprecated` | boolean | Whether the flag is deprecated |
  | `creationDate` | number | Unix timestamp in milliseconds when the flag was created |
  | `tags` | array | Tags applied to the flag |
  | `variations` | array | The variations for this feature flag |
  | ↳ `value` | string | The variation value (any JSON type, shown as text) |
  | ↳ `name` | string | The variation name |
  | ↳ `description` | string | The variation description |
  | `maintainerId` | string | The ID of the member who maintains this flag |
  | `maintainerEmail` | string | The email of the member who maintains this flag |
  | `on` | boolean | Whether the flag is on in the requested environment (null when the flag spans multiple environments and no environment key was provided) |
</ReferenceDetails>

### LaunchDarkly Get Flag Status [#launchdarkly-get-flag-status]

Get the status of a feature flag across environments (active, inactive, launched, etc.).

<ReferenceDetails>
  #### Input [#input-4]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `projectKey` | string | Yes | The project key |
  | `flagKey` | string | Yes | The feature flag key |
  | `environmentKey` | string | Yes | The environment key |

  #### Output [#output-4]

  | Parameter | Type | Description |
  | - | - | - |
  | `name` | string | The flag status (new, active, inactive, launched) |
  | `lastRequested` | string | Timestamp of the last evaluation |
  | `defaultVal` | string | The default variation value |
</ReferenceDetails>

### LaunchDarkly List Environments [#launchdarkly-list-environments]

List environments in a LaunchDarkly project.

<ReferenceDetails>
  #### Input [#input-5]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `projectKey` | string | Yes | The project key to list environments for |
  | `limit` | number | No | Maximum number of environments to return (default 20) |

  #### Output [#output-5]

  | Parameter | Type | Description |
  | - | - | - |
  | `environments` | array | List of environments |
  | ↳ `id` | string | The environment ID |
  | ↳ `key` | string | The unique environment key |
  | ↳ `name` | string | The environment name |
  | ↳ `color` | string | The color assigned to this environment |
  | ↳ `apiKey` | string | The server-side SDK key for this environment |
  | ↳ `mobileKey` | string | The mobile SDK key for this environment |
  | ↳ `tags` | array | Tags applied to the environment |
  | `totalCount` | number | Total number of environments |
</ReferenceDetails>

### LaunchDarkly List Flags [#launchdarkly-list-flags]

List feature flags in a LaunchDarkly project.

<ReferenceDetails>
  #### Input [#input-6]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `projectKey` | string | Yes | The project key to list flags for |
  | `environmentKey` | string | No | Filter flag configurations to a specific environment |
  | `tag` | string | No | Filter flags by tag name |
  | `limit` | number | No | Maximum number of flags to return (default 20) |

  #### Output [#output-6]

  | Parameter | Type | Description |
  | - | - | - |
  | `flags` | array | List of feature flags |
  | ↳ `key` | string | The unique key of the feature flag |
  | ↳ `name` | string | The human-readable name of the feature flag |
  | ↳ `kind` | string | The type of flag (boolean or multivariate) |
  | ↳ `description` | string | Description of the feature flag |
  | ↳ `temporary` | boolean | Whether the flag is temporary |
  | ↳ `archived` | boolean | Whether the flag is archived |
  | ↳ `deprecated` | boolean | Whether the flag is deprecated |
  | ↳ `creationDate` | number | Unix timestamp in milliseconds when the flag was created |
  | ↳ `tags` | array | Tags applied to the flag |
  | ↳ `variations` | array | The variations for this feature flag |
  | ↳ `value` | string | The variation value (any JSON type, shown as text) |
  | ↳ `name` | string | The variation name |
  | ↳ `description` | string | The variation description |
  | ↳ `maintainerId` | string | The ID of the member who maintains this flag |
  | ↳ `maintainerEmail` | string | The email of the member who maintains this flag |
  | `totalCount` | number | Total number of flags |
</ReferenceDetails>

### LaunchDarkly List Members [#launchdarkly-list-members]

List account members in your LaunchDarkly organization.

<ReferenceDetails>
  #### Input [#input-7]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `limit` | number | No | Maximum number of members to return (default 20) |

  #### Output [#output-7]

  | Parameter | Type | Description |
  | - | - | - |
  | `members` | array | List of account members |
  | ↳ `id` | string | The member ID |
  | ↳ `email` | string | The member email address |
  | ↳ `firstName` | string | The member first name |
  | ↳ `lastName` | string | The member last name |
  | ↳ `role` | string | The member role (reader, writer, admin, owner) |
  | ↳ `lastSeen` | number | Unix timestamp of last activity |
  | ↳ `creationDate` | number | Unix timestamp when the member was created |
  | ↳ `verified` | boolean | Whether the member email is verified |
  | `totalCount` | number | Total number of members |
</ReferenceDetails>

### LaunchDarkly List Projects [#launchdarkly-list-projects]

List all projects in your LaunchDarkly account.

<ReferenceDetails>
  #### Input [#input-8]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `limit` | number | No | Maximum number of projects to return (default 20) |

  #### Output [#output-8]

  | Parameter | Type | Description |
  | - | - | - |
  | `projects` | array | List of projects |
  | ↳ `id` | string | The project ID |
  | ↳ `key` | string | The unique project key |
  | ↳ `name` | string | The project name |
  | ↳ `tags` | array | Tags applied to the project |
  | `totalCount` | number | Total number of projects |
</ReferenceDetails>

### LaunchDarkly List Segments [#launchdarkly-list-segments]

List user segments in a LaunchDarkly project and environment.

<ReferenceDetails>
  #### Input [#input-9]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `projectKey` | string | Yes | The project key |
  | `environmentKey` | string | Yes | The environment key |
  | `limit` | number | No | Maximum number of segments to return (default 20) |

  #### Output [#output-9]

  | Parameter | Type | Description |
  | - | - | - |
  | `segments` | array | List of user segments |
  | ↳ `key` | string | The unique segment key |
  | ↳ `name` | string | The segment name |
  | ↳ `description` | string | The segment description |
  | ↳ `tags` | array | Tags applied to the segment |
  | ↳ `creationDate` | number | Unix timestamp in milliseconds when the segment was created |
  | ↳ `unbounded` | boolean | Whether this is an unbounded (big) segment |
  | ↳ `included` | array | User keys explicitly included in the segment |
  | ↳ `excluded` | array | User keys explicitly excluded from the segment |
  | `totalCount` | number | Total number of segments |
</ReferenceDetails>

### LaunchDarkly Toggle Flag [#launchdarkly-toggle-flag]

Toggle a feature flag on or off in a specific LaunchDarkly environment.

<ReferenceDetails>
  #### Input [#input-10]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `projectKey` | string | Yes | The project key |
  | `flagKey` | string | Yes | The feature flag key to toggle |
  | `environmentKey` | string | Yes | The environment key to toggle the flag in |
  | `enabled` | boolean | Yes | Whether to turn the flag on (true) or off (false) |

  #### Output [#output-10]

  | Parameter | Type | Description |
  | - | - | - |
  | `key` | string | The unique key of the feature flag |
  | `name` | string | The human-readable name of the feature flag |
  | `kind` | string | The type of flag (boolean or multivariate) |
  | `description` | string | Description of the feature flag |
  | `temporary` | boolean | Whether the flag is temporary |
  | `archived` | boolean | Whether the flag is archived |
  | `deprecated` | boolean | Whether the flag is deprecated |
  | `creationDate` | number | Unix timestamp in milliseconds when the flag was created |
  | `tags` | array | Tags applied to the flag |
  | `variations` | array | The variations for this feature flag |
  | ↳ `value` | string | The variation value (any JSON type, shown as text) |
  | ↳ `name` | string | The variation name |
  | ↳ `description` | string | The variation description |
  | `maintainerId` | string | The ID of the member who maintains this flag |
  | `maintainerEmail` | string | The email of the member who maintains this flag |
  | `on` | boolean | Whether the flag is now on in the target environment |
</ReferenceDetails>

### LaunchDarkly Update Flag [#launchdarkly-update-flag]

Update feature flag metadata (name, description, tags, temporary, archived) using semantic patch.

<ReferenceDetails>
  #### Input [#input-11]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | LaunchDarkly API key |
  | `projectKey` | string | Yes | The project key |
  | `flagKey` | string | Yes | The feature flag key to update |
  | `updateName` | string | No | New name for the flag |
  | `updateDescription` | string | No | New description for the flag |
  | `addTags` | string | No | Comma-separated tags to add |
  | `removeTags` | string | No | Comma-separated tags to remove |
  | `archive` | boolean | No | Set to true to archive, false to restore |
  | `comment` | string | No | Optional comment explaining the update |

  #### Output [#output-11]

  | Parameter | Type | Description |
  | - | - | - |
  | `key` | string | The unique key of the feature flag |
  | `name` | string | The human-readable name of the feature flag |
  | `kind` | string | The type of flag (boolean or multivariate) |
  | `description` | string | Description of the feature flag |
  | `temporary` | boolean | Whether the flag is temporary |
  | `archived` | boolean | Whether the flag is archived |
  | `deprecated` | boolean | Whether the flag is deprecated |
  | `creationDate` | number | Unix timestamp in milliseconds when the flag was created |
  | `tags` | array | Tags applied to the flag |
  | `variations` | array | The variations for this feature flag |
  | ↳ `value` | string | The variation value (any JSON type, shown as text) |
  | ↳ `name` | string | The variation name |
  | ↳ `description` | string | The variation description |
  | `maintainerId` | string | The ID of the member who maintains this flag |
  | `maintainerEmail` | string | The email of the member who maintains this flag |
</ReferenceDetails>
