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
- OpenAPI
- Specification ↗
- Spec updated
- 2021-07-19
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://app.launchdarkly.com/api/v2/" \
-H "Accept: application/json" \
-H "X-API-Key: YOUR_API_KEY"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);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
| Method | Path | What 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-configs | Returns a list of relay proxy configurations in the account. |
| POST | /account/relay-auto-configs | Create 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}/reset | Reset a relay proxy configuration's secret key with an optional expiry time for the old key. |
| GET | /auditlog | Get 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 | /destinations | Returns 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-flags | Get 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}/copy | Copies the feature flag configuration from one environment to the same feature flag in another environment. |
| GET | /flags/{projectKey}/{featureFlagKey}/dependent-flags | Get 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 | /integrations | Get 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 | /members | Returns a list of all members in the account. |
| POST | /members | Invite new members. |
| GET | /members/me | Get 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 | /projects | Returns a list of all projects in the account. |
| POST | /projects | Create 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}/environments | Create 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}/apiKey | Reset an environment's SDK key with an optional expiry time for the old key. |
| POST | /projects/{projectKey}/environments/{environmentKey}/mobileKey | Reset 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-requests | Get 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}/apply | Apply approval request for a feature flag config |
| POST | /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/review | Review approval request for a feature flag config |
| GET | /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes | Get all scheduled workflows for a feature flag by key. |
| POST | /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes | Creates a new scheduled change for a feature flag. |
| POST | /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes-conflicts | Lists 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 | /roles | Return a complete list of custom roles. |
| POST | /roles | Create 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}/users | Update 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 | /tokens | Returns a list of tokens in the account. |
| POST | /tokens | Create 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}/reset | Reset an access token's secret key with an optional expiry time for the old key. |
| GET | /usage | Returns of the usage endpoints available. |
| GET | /usage/evaluations/{envId}/{flagKey} | Get events usage by event id and the feature flag key. |
| GET | /usage/events | Get events usage endpoints. |
| GET | /usage/events/{type} | Get events usage by event type. |
| GET | /usage/mau | Get monthly active user data. |
| GET | /usage/mau/bycategory | Get monthly active user data by category. |
| GET | /usage/streams | Returns a list of all streams. |
| GET | /usage/streams/{source} | Get a stream endpoint and return timeseries data. |
| GET | /usage/streams/{source}/bysdkversion | Get a stream timeseries data by source show sdk version metadata. |
| GET | /usage/streams/{source}/sdkversions | Get 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}/flags | Fetch 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.
Similar development APIs
Compare alternatives →Cloudflare
DevelopmentManage DNS, CDN, Workers and other services; documented with an official OpenAPI 3.0 spec
Azure DevOps
DevelopmentThe Azure DevOps basic components of a REST API request/response pair
IPify
DevelopmentA simple IP Address API
App Store Connect API
DevelopmentThe data structure that represents an app store connect api resource.
StackExchange
DevelopmentQ&A forum for developers
IPinfo
DevelopmentAnother simple IP Address API
Listed from APIs.guru (CC0).