Create approval request for a flag
Create an approval request for a feature flag.
Authorization
ApiKey read, writeIn: header
Scope: read, write
Path Parameters
The project key
stringThe feature flag key
stringThe environment key
stringRequest Body
application/json
Optional comment describing the approval request
A brief description of the changes you're requesting
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.
An array of member IDs. These members are notified to review the approval request.
An array of team keys. The members of these teams are notified to review the approval request.
Timestamp for when instructions will be executed
int64The ID of a scheduled change. Include this if your instructions include editing or deleting a scheduled change.
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.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v2/projects/string/flags/string/environments/string/approval-requests" \ -H "Content-Type: application/json" \ -d '{ "description": "Requesting to update targeting", "instructions": "[{\\"kind\\": \\"addTargets\\", \\"values\\": [ \\"context-key-123abc\\"], \\"variationId\\": \\"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\\" }]" }'{ "_id": "12ab3c45de678910abc12345", "_version": 1, "creationDate": "1654104600000", "serviceKind": "launchdarkly", "requestorId": "12ab3c45de678910abc12345", "description": "example: request approval from someone", "reviewStatus": "pending", "allReviews": [ { "_id": "12ab3c45de678910abc12345", "kind": "approve", "creationDate": "1653606981113", "comment": "Approved!", "memberId": "12ab3c45de678910abc12345", "serviceTokenId": "12ab3c45de678910abc12345" } ], "notifyMemberIds": [ "1234a56b7c89d012345e678f" ], "notifyTeamKeys": [ "example-reviewer-team" ], "appliedDate": "1654104600000", "appliedByMemberId": "1234a56b7c89d012345e678f", "appliedByServiceTokenId": "1234a56b7c89d012345e678f", "status": "pending", "instructions": "[{\"kind\": \"turnFlagOn\"}]", "conflicts": [ { "instruction": { "property1": null, "property2": null }, "reason": "string" } ], "_links": { "property1": null, "property2": null }, "executionDate": "1654104600000", "operatingOnId": "12ab3c45de678910abc12345", "integrationMetadata": { "externalId": "string", "externalStatus": { "display": "string", "value": "string" }, "externalUrl": "string", "lastChecked": 0 }, "source": { "key": "source-flag-key-123abc", "version": 1 }, "customWorkflowMetadata": { "name": "Example workflow name", "stage": { "index": 0, "name": "Stage 1" } }}