For the complete documentation index, see llms.txt. For the full documentation snapshot, see llms-full.txt.
Create an approval request for a feature flag.
curl --request POST \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Requesting to update targeting",
"instructions": "[{\"kind\": \"addTargets\", \"values\": [ \"context-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]",
"comment": "optional comment",
"notifyMemberIds": [
"1234a56b7c89d012345e678f"
],
"notifyTeamKeys": [
"example-reviewer-team"
],
"executionDate": "1653926400000",
"operatingOnId": "6297ed79dee7dc14e1f9a80c",
"integrationConfig": {}
}
'{
"_id": "12ab3c45de678910abc12345",
"_version": 1,
"creationDate": "1654104600000",
"serviceKind": "launchdarkly",
"reviewStatus": "pending",
"allReviews": [
{
"_id": "12ab3c45de678910abc12345",
"kind": "approve",
"creationDate": "1653606981113",
"comment": "Approved!",
"memberId": "12ab3c45de678910abc12345",
"serviceTokenId": "12ab3c45de678910abc12345"
}
],
"notifyMemberIds": [
"1234a56b7c89d012345e678f"
],
"status": "pending",
"instructions": "[{\"kind\": \"turnFlagOn\"}]",
"conflicts": [
{
"instruction": {},
"reason": "<string>"
}
],
"_links": {},
"requestorId": "12ab3c45de678910abc12345",
"description": "example: request approval from someone",
"appliedDate": "1654104600000",
"appliedByMemberId": "1234a56b7c89d012345e678f",
"appliedByServiceTokenId": "1234a56b7c89d012345e678f",
"executionDate": "1654104600000",
"operatingOnId": "12ab3c45de678910abc12345",
"integrationMetadata": {
"externalId": "<string>",
"externalStatus": {
"display": "<string>",
"value": "<string>"
},
"externalUrl": "<string>",
"lastChecked": 123
},
"source": {
"key": "source-flag-key-123abc",
"version": 1
},
"customWorkflowMetadata": {
"name": "Example workflow name",
"stage": {
"index": 0,
"name": "Stage 1"
}
}
}Documentation Index
Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The project key
The feature flag key
The environment key
A brief description of the changes you're requesting
"Requesting to update targeting"
List of instructions in semantic patch format to be applied to the feature flag. Review the Update feature flag documentation for details on available instructions.
Show child attributes
"[{\"kind\": \"addTargets\", \"values\": [ \"context-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]"
Optional comment describing the approval request
"optional comment"
An array of member IDs. These members are notified to review the approval request.
["1234a56b7c89d012345e678f"]An array of team keys. The members of these teams are notified to review the approval request.
["example-reviewer-team"]Timestamp for when instructions will be executed
"1653926400000"
The ID of a scheduled change. Include this if your instructions include editing or deleting a scheduled change.
"6297ed79dee7dc14e1f9a80c"
Additional approval request fields for third-party integration approval systems. If you are using a third-party integration to manage approval requests, these additional fields will be described in the manifest.json for that integration, at https://github.com/launchdarkly/integration-framework.
Show child attributes
Approval request response
The ID of this approval request
"12ab3c45de678910abc12345"
Version of the approval request
1
Timestamp of when the approval request was created
"1654104600000"
The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.
"launchdarkly"
Current status of the review of this approval request
approved, declined, pending "pending"
An array of individual reviews of this approval request
Show child attributes
An array of member IDs. These members are notified to review the approval request.
["1234a56b7c89d012345e678f"]Current status of the approval request
pending, completed, failed, scheduled "pending"
List of instructions in semantic patch format to be applied to the feature flag
Show child attributes
"[{\"kind\": \"turnFlagOn\"}]"
Details on any conflicting approval requests
Show child attributes
The location and content type of related resources
Show child attributes
The ID of the member who requested the approval
"12ab3c45de678910abc12345"
A human-friendly name for the approval request
"example: request approval from someone"
Timestamp of when the approval request was applied
"1654104600000"
The member ID of the member who applied the approval request
"1234a56b7c89d012345e678f"
The service token ID of the service token which applied the approval request
"1234a56b7c89d012345e678f"
Timestamp for when instructions will be executed
"1654104600000"
ID of scheduled change to edit or delete
"12ab3c45de678910abc12345"
Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used
Show child attributes
Details about the source feature flag, if copied
Show child attributes
Details about the custom workflow, if this approval request is part of a custom workflow
Show child attributes
curl --request POST \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Requesting to update targeting",
"instructions": "[{\"kind\": \"addTargets\", \"values\": [ \"context-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]",
"comment": "optional comment",
"notifyMemberIds": [
"1234a56b7c89d012345e678f"
],
"notifyTeamKeys": [
"example-reviewer-team"
],
"executionDate": "1653926400000",
"operatingOnId": "6297ed79dee7dc14e1f9a80c",
"integrationConfig": {}
}
'{
"_id": "12ab3c45de678910abc12345",
"_version": 1,
"creationDate": "1654104600000",
"serviceKind": "launchdarkly",
"reviewStatus": "pending",
"allReviews": [
{
"_id": "12ab3c45de678910abc12345",
"kind": "approve",
"creationDate": "1653606981113",
"comment": "Approved!",
"memberId": "12ab3c45de678910abc12345",
"serviceTokenId": "12ab3c45de678910abc12345"
}
],
"notifyMemberIds": [
"1234a56b7c89d012345e678f"
],
"status": "pending",
"instructions": "[{\"kind\": \"turnFlagOn\"}]",
"conflicts": [
{
"instruction": {},
"reason": "<string>"
}
],
"_links": {},
"requestorId": "12ab3c45de678910abc12345",
"description": "example: request approval from someone",
"appliedDate": "1654104600000",
"appliedByMemberId": "1234a56b7c89d012345e678f",
"appliedByServiceTokenId": "1234a56b7c89d012345e678f",
"executionDate": "1654104600000",
"operatingOnId": "12ab3c45de678910abc12345",
"integrationMetadata": {
"externalId": "<string>",
"externalStatus": {
"display": "<string>",
"value": "<string>"
},
"externalUrl": "<string>",
"lastChecked": 123
},
"source": {
"key": "source-flag-key-123abc",
"version": 1
},
"customWorkflowMetadata": {
"name": "Example workflow name",
"stage": {
"index": 0,
"name": "Stage 1"
}
}
}