You can create an approval request that prevents a flag change from being applied without approval from a team member. Select up to ten members as reviewers. Reviewers receive an email notification, but anyone with sufficient permissions can review a pending approval request. A change needs at least one approval before you can apply it. To learn more, read Approvals.
Changes that conflict will fail if approved and applied, and the flag will not be updated.
Get all approval requests for a feature flag.
Successful approval request response
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
curl -i -X GET \ 'https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "items": [
- {
- "_id": "string",
- "_version": 0,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "string",
- "description": "string",
- "reviewStatus": "string",
- "allReviews": [
- {
- "_id": "string",
- "kind": "approve",
- "creationDate": 0,
- "comment": "string",
- "memberId": "string"
}
], - "notifyMemberIds": [
- "string"
], - "appliedDate": 0,
- "appliedByMemberId": "string",
- "status": "string",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "executionDate": 0,
- "operatingOnId": "string",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "string",
- "version": 0
}, - "customWorkflowMetadata": {
- "name": "string",
- "stage": {
- "index": 0,
- "name": "string"
}
}
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}
Create an approval request for a feature flag.
Successful approval request response
Invalid request
Invalid access token
Forbidden
Rate limited
{- "comment": "string",
- "description": "string",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "notifyMemberIds": [
- "string"
], - "executionDate": 0,
- "operatingOnId": "string",
- "integrationConfig": {
- "property1": null,
- "property2": null
}
}
{- "_id": "string",
- "_version": 0,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "string",
- "description": "string",
- "reviewStatus": "string",
- "allReviews": [
- {
- "_id": "string",
- "kind": "approve",
- "creationDate": 0,
- "comment": "string",
- "memberId": "string"
}
], - "notifyMemberIds": [
- "string"
], - "appliedDate": 0,
- "appliedByMemberId": "string",
- "status": "string",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "executionDate": 0,
- "operatingOnId": "string",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "string",
- "version": 0
}, - "customWorkflowMetadata": {
- "name": "string",
- "stage": {
- "index": 0,
- "name": "string"
}
}
}
Create an approval request to copy a feature flag's configuration across environments.
Successful approval request response
Invalid request
Invalid access token
Forbidden
Status conflict
Rate limited
{- "comment": "string",
- "description": "string",
- "notifyMemberIds": [
- "string"
], - "source": {
- "key": "string",
- "version": 0
}, - "includedActions": [
- "string"
], - "excludedActions": [
- "string"
]
}
{- "_id": "string",
- "_version": 0,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "string",
- "description": "string",
- "reviewStatus": "string",
- "allReviews": [
- {
- "_id": "string",
- "kind": "approve",
- "creationDate": 0,
- "comment": "string",
- "memberId": "string"
}
], - "notifyMemberIds": [
- "string"
], - "appliedDate": 0,
- "appliedByMemberId": "string",
- "status": "string",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "executionDate": 0,
- "operatingOnId": "string",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "string",
- "version": 0
}, - "customWorkflowMetadata": {
- "name": "string",
- "stage": {
- "index": 0,
- "name": "string"
}
}
}
Get a single approval request for a feature flag.
Successful approval request response
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
curl -i -X GET \ 'https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "_id": "string",
- "_version": 0,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "string",
- "description": "string",
- "reviewStatus": "string",
- "allReviews": [
- {
- "_id": "string",
- "kind": "approve",
- "creationDate": 0,
- "comment": "string",
- "memberId": "string"
}
], - "notifyMemberIds": [
- "string"
], - "appliedDate": 0,
- "appliedByMemberId": "string",
- "status": "string",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "executionDate": 0,
- "operatingOnId": "string",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "string",
- "version": 0
}, - "customWorkflowMetadata": {
- "name": "string",
- "stage": {
- "index": 0,
- "name": "string"
}
}
}
Delete an approval request for a feature flag.
Action succeeded
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
curl -i -X DELETE \ 'https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "code": "unauthorized",
- "message": "invalid key"
}
Apply an approval request by approving or denying changes.
Successful approval request apply response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "comment": "string"
}
{- "_id": "string",
- "_version": 0,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "string",
- "description": "string",
- "reviewStatus": "string",
- "allReviews": [
- {
- "_id": "string",
- "kind": "approve",
- "creationDate": 0,
- "comment": "string",
- "memberId": "string"
}
], - "notifyMemberIds": [
- "string"
], - "appliedDate": 0,
- "appliedByMemberId": "string",
- "status": "string",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "executionDate": 0,
- "operatingOnId": "string",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "string",
- "version": 0
}, - "customWorkflowMetadata": {
- "name": "string",
- "stage": {
- "index": 0,
- "name": "string"
}
}
}
Review an approval request by approving or denying changes.
Successful approval request review response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "kind": "string",
- "comment": "string"
}
{- "_id": "string",
- "_version": 0,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "string",
- "description": "string",
- "reviewStatus": "string",
- "allReviews": [
- {
- "_id": "string",
- "kind": "approve",
- "creationDate": 0,
- "comment": "string",
- "memberId": "string"
}
], - "notifyMemberIds": [
- "string"
], - "appliedDate": 0,
- "appliedByMemberId": "string",
- "status": "string",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "executionDate": 0,
- "operatingOnId": "string",
- "integrationMetadata": {
- "externalId": "string",
- "externalStatus": {
- "display": "string",
- "value": "string"
}, - "externalUrl": "string",
- "lastChecked": 0
}, - "source": {
- "key": "string",
- "version": 0
}, - "customWorkflowMetadata": {
- "name": "string",
- "stage": {
- "index": 0,
- "name": "string"
}
}
}