Approvals

You may create an approval request for updating a flag and request approval from a team member before applying the changes. You may to select up to ten reviewers to be notified via email, however, anyone with the sufficient permissions can review a pending approval request. At least one approval is needed to allow the changes to be applied.

Change instructions that are in a conflict state will fail if approved and applied, and the flag will not be updated.

List all approval requests

Get all approval requests for a feature flag

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's key

environmentKey
required
string <string>

The environment key

Responses
200

Successful approval request response

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests
Request samples
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/approval-requests \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "items": [
    ],
  • "_links": {
    }
}

Create approval request

Create an approval request for a feature flag

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's key

environmentKey
required
string <string>

The environment key

Request Body schema: application/json
comment
string

A comment describing the approval request

description
required
string

A human-friendly name for the approval request

required
Array of objects (Instructions)
notifyMemberIds
required
Array of strings

An array of member IDs. These members are notified to review the approval request

executionDate
integer <int64> (UnixMillis)
operatingOnId
string

ID of scheduled change to edit or delete

object (FormVariableConfig)
Responses
201

Successful approval request response

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

post/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests
Request samples
application/json
{
  • "comment": "string",
  • "description": "string",
  • "instructions": [
    ],
  • "notifyMemberIds": [
    ],
  • "executionDate": 0,
  • "operatingOnId": "string",
  • "integrationConfig": {
    }
}
Response samples
application/json
{
  • "_id": "string",
  • "_version": 0,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "string",
  • "description": "string",
  • "reviewStatus": "string",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "string",
  • "status": "string",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "string",
  • "integrationMetadata": {
    },
  • "source": {
    },
  • "customWorkflowMetadata": {
    }
}

Create approval request to copy flag configurations across environments

Create an approval request to copy a feature flag's configuration across environments.

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's key

environmentKey
required
string <string>

The environment key

Request Body schema: application/json
comment
string

A comment describing the approval request

description
required
string
notifyMemberIds
required
Array of strings

An array of member IDs. These members are notified to review the approval request.

required
object (sourceFlag)
includedActions
Array of strings
excludedActions
Array of strings
Responses
201

Successful approval request response

400

Invalid request

401

Invalid access token

403

Forbidden

409

Status conflict

429

Rate limited

post/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy
Request samples
application/json
{
  • "comment": "string",
  • "description": "string",
  • "notifyMemberIds": [
    ],
  • "source": {
    },
  • "includedActions": [
    ],
  • "excludedActions": [
    ]
}
Response samples
application/json
{
  • "_id": "string",
  • "_version": 0,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "string",
  • "description": "string",
  • "reviewStatus": "string",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "string",
  • "status": "string",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "string",
  • "integrationMetadata": {
    },
  • "source": {
    },
  • "customWorkflowMetadata": {
    }
}

Get approval request

Get a single approval request for a feature flag

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The feature flag approval request ID

Responses
200

Successful approval request response

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}
Request samples
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'
Response samples
application/json
{
  • "_id": "string",
  • "_version": 0,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "string",
  • "description": "string",
  • "reviewStatus": "string",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "string",
  • "status": "string",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "string",
  • "integrationMetadata": {
    },
  • "source": {
    },
  • "customWorkflowMetadata": {
    }
}

Delete approval request

Delete an approval request for a feature flag

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The feature flag approval request ID

Responses
204

Action succeeded

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

delete/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}
Request samples
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'
Response samples
application/json
{
  • "code": "unauthorized",
  • "message": "invalid key"
}

Apply approval request

Apply approval request by either approving or declining changes.

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The feature flag approval request ID

Request Body schema: application/json
comment
string
Responses
200

Successful approval request apply response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

post/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply
Request samples
application/json
{
  • "comment": "string"
}
Response samples
application/json
{
  • "_id": "string",
  • "_version": 0,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "string",
  • "description": "string",
  • "reviewStatus": "string",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "string",
  • "status": "string",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "string",
  • "integrationMetadata": {
    },
  • "source": {
    },
  • "customWorkflowMetadata": {
    }
}

Review approval request

Review approval request by either approving or declining changes.

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag's key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The feature flag approval request ID

Request Body schema: application/json
kind
string
comment
string
Responses
200

Successful approval request review response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

post/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews
Request samples
application/json
{
  • "kind": "string",
  • "comment": "string"
}
Response samples
application/json
{
  • "_id": "string",
  • "_version": 0,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "string",
  • "description": "string",
  • "reviewStatus": "string",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "string",
  • "status": "string",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "string",
  • "integrationMetadata": {
    },
  • "source": {
    },
  • "customWorkflowMetadata": {
    }
}