Approvals

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.

List all approval requests

Get all approval requests for a feature flag.

Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag key

environmentKey
required
string <string>

The environment key

Responses
200

Approval request collection 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
Response samples
application/json
{
  • "items": [
    ],
  • "_links": {
    }
}

Create approval request

Create an approval request for a feature flag.

Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag key

environmentKey
required
string <string>

The environment key

Request Body schema: application/json
comment
string

Optional comment describing the approval request

description
required
string

A brief description of the changes you're requesting

required
Array of objects (Instructions)
notifyMemberIds
Array of strings

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

notifyTeamKeys
Array of strings

An array of team keys. The members of these teams are notified to review the approval request.

executionDate
integer <int64> (UnixMillis)
operatingOnId
string

The ID of a scheduled change. Include this if your instructions include editing or deleting a scheduled change.

object (FormVariableConfig)
Responses
201

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": "optional comment",
  • "description": "Requesting to update targeting",
  • "instructions": [
    ],
  • "notifyMemberIds": [
    ],
  • "notifyTeamKeys": [
    ],
  • "executionDate": 0,
  • "operatingOnId": "6297ed79dee7dc14e1f9a80c",
  • "integrationConfig": {
    }
}
Response samples
application/json
{
  • "_id": "12ab3c45de678910abc12345",
  • "_version": 1,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "12ab3c45de678910abc12345",
  • "description": "example: request approval from someone",
  • "reviewStatus": "pending",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "1234a56b7c89d012345e678f",
  • "status": "pending",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "12ab3c45de678910abc12345",
  • "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
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag key

environmentKey
required
string <string>

The environment key for the target environment

Request Body schema: application/json
comment
string

Optional comment describing the approval request

description
required
string

A brief description of your changes

notifyMemberIds
Array of strings

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

notifyTeamKeys
Array of strings

An array of team keys. The members of these teams are notified to review the approval request.

required
object (sourceFlag)
includedActions
Array of strings

Optional list of the flag changes to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If neither are included, then all flag changes will be copied.

Items Enum: "updateOn" "updateFallthrough" "updateOffVariation" "updateRules" "updateTargets" "updatePrerequisites"
excludedActions
Array of strings

Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If neither are included, then all flag changes will be copied.

Items Enum: "updateOn" "updateFallthrough" "updateOffVariation" "updateRules" "updateTargets" "updatePrerequisites"
Responses
201

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": "optional comment",
  • "description": "copy flag settings to another environment",
  • "notifyMemberIds": [
    ],
  • "notifyTeamKeys": [
    ],
  • "source": {
    },
  • "includedActions": [
    ],
  • "excludedActions": [
    ]
}
Response samples
application/json
{
  • "_id": "12ab3c45de678910abc12345",
  • "_version": 1,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "12ab3c45de678910abc12345",
  • "description": "example: request approval from someone",
  • "reviewStatus": "pending",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "1234a56b7c89d012345e678f",
  • "status": "pending",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "12ab3c45de678910abc12345",
  • "integrationMetadata": {
    },
  • "source": {
    },
  • "customWorkflowMetadata": {
    }
}

Get approval request

Get a single approval request for a feature flag.

Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The feature flag approval request ID

Responses
200

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
Response samples
application/json
{
  • "_id": "12ab3c45de678910abc12345",
  • "_version": 1,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "12ab3c45de678910abc12345",
  • "description": "example: request approval from someone",
  • "reviewStatus": "pending",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "1234a56b7c89d012345e678f",
  • "status": "pending",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "12ab3c45de678910abc12345",
  • "integrationMetadata": {
    },
  • "source": {
    },
  • "customWorkflowMetadata": {
    }
}

Delete approval request

Delete an approval request for a feature flag.

Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag 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
Response samples
application/json
{
  • "code": "unauthorized",
  • "message": "Invalid access token"
}

Apply approval request

Apply an approval request that has been approved.

Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag 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

Optional comment about the approval request

Responses
200

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": "Looks good, thanks for updating"
}
Response samples
application/json
{
  • "_id": "12ab3c45de678910abc12345",
  • "_version": 1,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "12ab3c45de678910abc12345",
  • "description": "example: request approval from someone",
  • "reviewStatus": "pending",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "1234a56b7c89d012345e678f",
  • "status": "pending",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "12ab3c45de678910abc12345",
  • "integrationMetadata": {
    },
  • "source": {
    },
  • "customWorkflowMetadata": {
    }
}

Review approval request

Review an approval request by approving or denying changes.

Request
path Parameters
projectKey
required
string <string>

The project key

featureFlagKey
required
string <string>

The feature flag 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

The type of review for this approval request

Enum: "approve" "comment" "decline"
comment
string

Optional comment about the approval request

Responses
200

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": "approve",
  • "comment": "Looks good, thanks for updating"
}
Response samples
application/json
{
  • "_id": "12ab3c45de678910abc12345",
  • "_version": 1,
  • "creationDate": 0,
  • "serviceKind": "string",
  • "requestorId": "12ab3c45de678910abc12345",
  • "description": "example: request approval from someone",
  • "reviewStatus": "pending",
  • "allReviews": [
    ],
  • "notifyMemberIds": [
    ],
  • "appliedDate": 0,
  • "appliedByMemberId": "1234a56b7c89d012345e678f",
  • "status": "pending",
  • "instructions": [
    ],
  • "conflicts": [
    ],
  • "_links": {
    },
  • "executionDate": 0,
  • "operatingOnId": "12ab3c45de678910abc12345",
  • "integrationMetadata": {
    },
  • "source": {
    },
  • "customWorkflowMetadata": {
    }
}