Skip to content

LaunchDarkly REST API API

by launchdarkly.com

API keyHTTPSDevelopment
Open documentation ↗

Overview

Build custom integrations with the LaunchDarkly REST API

LaunchDarkly REST API is a development API from launchdarkly.com. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 105 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Unknown
Category
Development
Base URL
https://app.launchdarkly.com/api/v2
Version
5.3.0
Endpoints
105
Spec updated
2021-07-19

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://app.launchdarkly.com/api/v2/" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("https://app.launchdarkly.com/api/v2/", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://app.launchdarkly.com/api/v2/",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/You can issue a GET request to the root resource to find all of the resource categories supported by the API.
GET/account/relay-auto-configsReturns a list of relay proxy configurations in the account.
POST/account/relay-auto-configsCreate a new relay proxy config.
GET/account/relay-auto-configs/{id}Get a single relay proxy configuration by ID.
PATCH/account/relay-auto-configs/{id}Modify a relay proxy configuration by ID.
DELETE/account/relay-auto-configs/{id}Delete a relay proxy configuration by ID.
POST/account/relay-auto-configs/{id}/resetReset a relay proxy configuration's secret key with an optional expiry time for the old key.
GET/auditlogGet a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search
GET/auditlog/{resourceId}Use this endpoint to fetch a single audit log entry by its resouce ID.
GET/destinationsReturns a list of all data export destinations.
POST/destinations/{projectKey}/{environmentKey}Create a new data export destination
GET/destinations/{projectKey}/{environmentKey}/{destinationId}Get a single data export destination by ID
PATCH/destinations/{projectKey}/{environmentKey}/{destinationId}Perform a partial update to a data export destination.
DELETE/destinations/{projectKey}/{environmentKey}/{destinationId}Get a single data export destination by ID
GET/flag-status/{projectKey}/{featureFlagKey}Get the status for a particular feature flag across environments
GET/flag-statuses/{projectKey}/{environmentKey}Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.
GET/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey}Get the status for a particular feature flag.
GET/flags/{projectKey}Get a list of all features in the given project.
POST/flags/{projectKey}Creates a new feature flag.
GET/flags/{projectKey}/{environmentKey}/{featureFlagKey}/dependent-flagsGet dependent flags for the flag in the environment specified in path parameters
GET/flags/{projectKey}/{featureFlagKey}Get a single feature flag by key.
PATCH/flags/{projectKey}/{featureFlagKey}Perform a partial update to a feature.
DELETE/flags/{projectKey}/{featureFlagKey}Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.
POST/flags/{projectKey}/{featureFlagKey}/copyCopies the feature flag configuration from one environment to the same feature flag in another environment.
GET/flags/{projectKey}/{featureFlagKey}/dependent-flagsGet dependent flags across all environments for the flag specified in the path parameters
GET/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}Get expiring user targets for feature flag
PATCH/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}Update, add, or delete expiring user targets on feature flag
GET/integrationsGet a list of all configured audit log event integrations associated with this account.
GET/integrations/{integrationKey}Get a list of all configured integrations of a given kind.
POST/integrations/{integrationKey}Create a new integration subscription of a given kind.
GET/integrations/{integrationKey}/{integrationId}Get a single integration subscription by ID.
PATCH/integrations/{integrationKey}/{integrationId}Modify an integration subscription by ID.
DELETE/integrations/{integrationKey}/{integrationId}Delete an integration subscription by ID.
GET/membersReturns a list of all members in the account.
POST/membersInvite new members.
GET/members/meGet the current team member associated with the token
GET/members/{memberId}Get a single team member by ID.
PATCH/members/{memberId}Modify a team member by ID.
DELETE/members/{memberId}Delete a team member by ID.
GET/projectsReturns a list of all projects in the account.
POST/projectsCreate a new project with the given key and name.
GET/projects/{projectKey}Fetch a single project by key.
PATCH/projects/{projectKey}Modify a project by ID.
DELETE/projects/{projectKey}Delete a project by key. Caution-- deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an accoun
POST/projects/{projectKey}/environmentsCreate a new environment in a specified project with a given name, key, and swatch color.
GET/projects/{projectKey}/environments/{environmentKey}Get an environment given a project and key.
PATCH/projects/{projectKey}/environments/{environmentKey}Modify an environment by ID. If you try to patch the environment by setting both required and requiredApprovalTags, it will result in an error. Users can specif
DELETE/projects/{projectKey}/environments/{environmentKey}Delete an environment in a specific project.
POST/projects/{projectKey}/environments/{environmentKey}/apiKeyReset an environment's SDK key with an optional expiry time for the old key.
POST/projects/{projectKey}/environments/{environmentKey}/mobileKeyReset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.
GET/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requestsGet all approval requests for a feature flag config
GET/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}Get a single approval request for a feature flag config
POST/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}Create an approval request for a feature flag config
DELETE/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}Delete an approval request for a feature flag config
POST/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/applyApply approval request for a feature flag config
POST/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/reviewReview approval request for a feature flag config
GET/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changesGet all scheduled workflows for a feature flag by key.
POST/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changesCreates a new scheduled change for a feature flag.
POST/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes-conflictsLists conflicts between the given instructions and any existing scheduled changes for the feature flag. The actual HTTP verb should be REPORT, not POST.
GET/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId}Get a scheduled change on a feature flag by id.
PATCH/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId}Updates an existing scheduled-change on a feature flag in an environment.
DELETE/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId}Delete a scheduled change on a feature flag in an environment.
GET/rolesReturn a complete list of custom roles.
POST/rolesCreate a new custom role.
GET/roles/{customRoleKey}Get one custom role by key.
PATCH/roles/{customRoleKey}Modify a custom role by key.
DELETE/roles/{customRoleKey}Delete a custom role by key.
GET/segments/{projectKey}/{environmentKey}Get a list of all user segments in the given project.
POST/segments/{projectKey}/{environmentKey}Creates a new user segment.
GET/segments/{projectKey}/{environmentKey}/{userSegmentKey}Get a single user segment by key.
PATCH/segments/{projectKey}/{environmentKey}/{userSegmentKey}Perform a partial update to a user segment.
DELETE/segments/{projectKey}/{environmentKey}/{userSegmentKey}Delete a user segment.
POST/segments/{projectKey}/{environmentKey}/{userSegmentKey}/usersUpdate targets included or excluded in a big segment
GET/segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey}Get expiring user targets for user segment
PATCH/segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey}Update, add, or delete expiring user targets on user segment
GET/tokensReturns a list of tokens in the account.
POST/tokensCreate a new token.
GET/tokens/{tokenId}Get a single access token by ID.
PATCH/tokens/{tokenId}Modify an access token by ID.
DELETE/tokens/{tokenId}Delete an access token by ID.
POST/tokens/{tokenId}/resetReset an access token's secret key with an optional expiry time for the old key.
GET/usageReturns of the usage endpoints available.
GET/usage/evaluations/{envId}/{flagKey}Get events usage by event id and the feature flag key.
GET/usage/eventsGet events usage endpoints.
GET/usage/events/{type}Get events usage by event type.
GET/usage/mauGet monthly active user data.
GET/usage/mau/bycategoryGet monthly active user data by category.
GET/usage/streamsReturns a list of all streams.
GET/usage/streams/{source}Get a stream endpoint and return timeseries data.
GET/usage/streams/{source}/bysdkversionGet a stream timeseries data by source show sdk version metadata.
GET/usage/streams/{source}/sdkversionsGet a stream timeseries data by source and show all sdk version associated.
GET/user-search/{projectKey}/{environmentKey}Search users in LaunchDarkly based on their last active date, or a search query. It should not be used to enumerate all users in LaunchDarkly-- use the List use
GET/users/{projectKey}/{environmentKey}List all users in the environment. Includes the total count of users. In each page, there will be up to 'limit' users returned (default 20). This is useful for
GET/users/{projectKey}/{environmentKey}/{userKey}Get a user by key.
DELETE/users/{projectKey}/{environmentKey}/{userKey}Delete a user by ID.
GET/users/{projectKey}/{environmentKey}/{userKey}/flagsFetch a single flag setting for a user by key.
GET/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey}Fetch a single flag setting for a user by key.
PUT/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey}Specifically enable or disable a feature flag for a user based on their key.
GET/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey}Get expiring dates on flags for user
PATCH/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey}Update, add, or delete expiring user targets for a single user on all flags

Showing the first 100 of 105 endpoints; the full list is in the documentation.

Questions

Does the LaunchDarkly REST API API need an API key?

Yes. The LaunchDarkly REST API API uses API key authentication; the documentation explains how to get credentials.

Does the LaunchDarkly REST API API support HTTPS?

Yes, the LaunchDarkly REST API API is served over HTTPS.

How many endpoints does the LaunchDarkly REST API API have?

Its OpenAPI description lists 105 endpoints in version 5.3.0. The first 100 are shown on this page.

What are alternatives to the LaunchDarkly REST API API?

Other Development APIs include Cloudflare, Azure DevOps, IPify, App Store Connect API, StackExchange.

Compare alternatives →

Listed from APIs.guru (CC0).