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.
Several of the endpoints in the approvals API require a flag approval request ID. The flag approval request ID is returned as part of the Create approval request and List approval requests for a flag responses. It is the _id
field, or the _id
field of each element in the items
array. If you created the approval request as part of a workflow, you can also use a workflow ID as the approval request ID. The workflow ID is returned as part of the Create workflow and Get workflows responses. It is the _id
field, or the _id
field of each element in the items
array.
Get all approval requests for a feature flag.
Approval request collection response
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "items": [
- {
- "_id": "12ab3c45de678910abc12345",
- "_version": 1,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "12ab3c45de678910abc12345",
- "description": "example: request approval from someone",
- "reviewStatus": "pending",
- "allReviews": [
- {
- "_id": "12ab3c45de678910abc12345",
- "kind": "approve",
- "creationDate": 0,
- "comment": "Approved!",
- "memberId": "12ab3c45de678910abc12345"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": null,
- "property2": null
}, - "executionDate": 0,
- "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"
}
}
}
], - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}
Create an approval request for a feature flag.
Approval request response
Invalid request
Invalid access token
Forbidden
Rate limited
{- "comment": "optional comment",
- "description": "Requesting to update targeting",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "notifyTeamKeys": [
- "example-reviewer-team"
], - "executionDate": 0,
- "operatingOnId": "6297ed79dee7dc14e1f9a80c",
- "integrationConfig": {
- "property1": null,
- "property2": null
}
}
{- "_id": "12ab3c45de678910abc12345",
- "_version": 1,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "12ab3c45de678910abc12345",
- "description": "example: request approval from someone",
- "reviewStatus": "pending",
- "allReviews": [
- {
- "_id": "12ab3c45de678910abc12345",
- "kind": "approve",
- "creationDate": 0,
- "comment": "Approved!",
- "memberId": "12ab3c45de678910abc12345"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": null,
- "property2": null
}, - "executionDate": 0,
- "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"
}
}
}
Create an approval request to copy a feature flag's configuration across environments.
Approval request response
Invalid request
Invalid access token
Forbidden
Status conflict
Rate limited
{- "comment": "optional comment",
- "description": "copy flag settings to another environment",
- "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "notifyTeamKeys": [
- "example-reviewer-team"
], - "source": {
- "key": "environment-key-123abc",
- "version": 1
}, - "includedActions": [
- "updateOn"
], - "excludedActions": [
- "updateOn"
]
}
{- "_id": "12ab3c45de678910abc12345",
- "_version": 1,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "12ab3c45de678910abc12345",
- "description": "example: request approval from someone",
- "reviewStatus": "pending",
- "allReviews": [
- {
- "_id": "12ab3c45de678910abc12345",
- "kind": "approve",
- "creationDate": 0,
- "comment": "Approved!",
- "memberId": "12ab3c45de678910abc12345"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": null,
- "property2": null
}, - "executionDate": 0,
- "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"
}
}
}
Get a single approval request for a feature flag.
Approval request response
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "_id": "12ab3c45de678910abc12345",
- "_version": 1,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "12ab3c45de678910abc12345",
- "description": "example: request approval from someone",
- "reviewStatus": "pending",
- "allReviews": [
- {
- "_id": "12ab3c45de678910abc12345",
- "kind": "approve",
- "creationDate": 0,
- "comment": "Approved!",
- "memberId": "12ab3c45de678910abc12345"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": null,
- "property2": null
}, - "executionDate": 0,
- "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"
}
}
}
Delete an approval request for a feature flag.
Action succeeded
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "code": "unauthorized",
- "message": "Invalid access token"
}
Apply an approval request that has been approved.
Approval request apply response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "comment": "Looks good, thanks for updating"
}
{- "_id": "12ab3c45de678910abc12345",
- "_version": 1,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "12ab3c45de678910abc12345",
- "description": "example: request approval from someone",
- "reviewStatus": "pending",
- "allReviews": [
- {
- "_id": "12ab3c45de678910abc12345",
- "kind": "approve",
- "creationDate": 0,
- "comment": "Approved!",
- "memberId": "12ab3c45de678910abc12345"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": null,
- "property2": null
}, - "executionDate": 0,
- "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"
}
}
}
Review an approval request by approving or denying changes.
Approval request review response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "kind": "approve",
- "comment": "Looks good, thanks for updating"
}
{- "_id": "12ab3c45de678910abc12345",
- "_version": 1,
- "creationDate": 0,
- "serviceKind": "string",
- "requestorId": "12ab3c45de678910abc12345",
- "description": "example: request approval from someone",
- "reviewStatus": "pending",
- "allReviews": [
- {
- "_id": "12ab3c45de678910abc12345",
- "kind": "approve",
- "creationDate": 0,
- "comment": "Approved!",
- "memberId": "12ab3c45de678910abc12345"
}
], - "notifyMemberIds": [
- "1234a56b7c89d012345e678f"
], - "appliedDate": 0,
- "appliedByMemberId": "1234a56b7c89d012345e678f",
- "status": "pending",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
], - "conflicts": [
- {
- "instruction": {
- "property1": null,
- "property2": null
}, - "reason": "string"
}
], - "_links": {
- "property1": null,
- "property2": null
}, - "executionDate": 0,
- "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"
}
}
}