For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
      • GETGet approval request settings
      • PATCHUpdate approval request
      • PATCHUpdate approval request settings
      • PATCHUpdate flag approval request
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewApprovals Beta

Update flag approval request

PATCH
/api/v2/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/approval-requests/:id
PATCH
/api/v2/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/approval-requests/:id
$curl -X PATCH https://app.launchdarkly.com/api/v2/projects/projectKey/flags/featureFlagKey/environments/environmentKey/approval-requests/id \
> -H "Authorization: <apiKey>"
1{
2 "_id": "12ab3c45de678910abc12345",
3 "_version": 1,
4 "creationDate": 1654104600000,
5 "serviceKind": "launchdarkly",
6 "reviewStatus": "pending",
7 "allReviews": [
8 {
9 "_id": "12ab3c45de678910abc12345",
10 "kind": "approve",
11 "creationDate": 1653606981113,
12 "comment": "Approved!",
13 "memberId": "12ab3c45de678910abc12345",
14 "serviceTokenId": "12ab3c45de678910abc12345"
15 }
16 ],
17 "notifyMemberIds": [
18 "1234a56b7c89d012345e678f"
19 ],
20 "status": "pending",
21 "instructions": [
22 "[{\"kind\": \"turnFlagOn\"}]"
23 ],
24 "conflicts": [
25 {
26 "instruction": {},
27 "reason": "string"
28 }
29 ],
30 "_links": {},
31 "requestorId": "12ab3c45de678910abc12345",
32 "description": "example: request approval from someone",
33 "appliedDate": 1654104600000,
34 "appliedByMemberId": "1234a56b7c89d012345e678f",
35 "appliedByServiceTokenId": "1234a56b7c89d012345e678f",
36 "executionDate": 1654104600000,
37 "operatingOnId": "12ab3c45de678910abc12345",
38 "integrationMetadata": {
39 "externalId": "string",
40 "externalStatus": {
41 "display": "string",
42 "value": "string"
43 },
44 "externalUrl": "string",
45 "lastChecked": 1
46 },
47 "source": {
48 "key": "source-flag-key-123abc",
49 "version": 1
50 },
51 "customWorkflowMetadata": {
52 "name": "Example workflow name",
53 "stage": {
54 "index": 0,
55 "name": "Stage 1"
56 }
57 }
58}
Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint requires a feature flag key, and can only be used for updating approval requests for flags. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating an approval request. #### addReviewers Adds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`. ##### Parameters - `notifyMemberIds`: (Optional) List of member IDs. - `notifyTeamKeys`: (Optional) List of team keys. #### updateDescription Updates the description (title) of the approval request. ##### Parameters - `value`: (Required) The new description for the approval request. Must be non-empty and no more than 5000 characters.
Was this page helpful?
Previous

Audit Log

Next
Built with

Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint requires a feature flag key, and can only be used for updating approval requests for flags.

To make a semantic patch request, you must append domain-model=launchdarkly.semanticpatch to your Content-Type header. To learn more, read Updates using semantic patch.

Instructions

Semantic patch requests support the following kind instructions for updating an approval request.

addReviewers

Adds the specified members and teams to the existing list of reviewers. You must include at least one of notifyMemberIds and notifyTeamKeys.

Parameters
  • notifyMemberIds: (Optional) List of member IDs.
  • notifyTeamKeys: (Optional) List of team keys.

updateDescription

Updates the description (title) of the approval request.

Parameters
  • value: (Required) The new description for the approval request. Must be non-empty and no more than 5000 characters.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequiredformat: "string"
The project key
featureFlagKeystringRequiredformat: "string"
The feature flag key
environmentKeystringRequiredformat: "string"
The environment key
idstringRequiredformat: "string"
The approval ID

Response

Approval request response
_idstring
The ID of this approval request
_versioninteger
Version of the approval request
creationDatelong
Timestamp of when the approval request was created
serviceKindstring
The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.
reviewStatusenum
Current status of the review of this approval request
Allowed values:
allReviewslist of objects
An array of individual reviews of this approval request
notifyMemberIdslist of strings
An array of member IDs. These members are notified to review the approval request.
statusenum
Current status of the approval request
Allowed values:
instructionslist of maps from strings to any
List of instructions in semantic patch format to be applied to the feature flag
conflictslist of objects
Details on any conflicting approval requests
_linksmap from strings to any
The location and content type of related resources
requestorIdstring
The ID of the member who requested the approval
descriptionstring

A human-friendly name for the approval request

appliedDatelong
Timestamp of when the approval request was applied
appliedByMemberIdstring
The member ID of the member who applied the approval request
appliedByServiceTokenIdstring
The service token ID of the service token which applied the approval request
executionDatelong
Timestamp for when instructions will be executed
operatingOnIdstring
ID of scheduled change to edit or delete
integrationMetadataobject
Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used
sourceobject
Details about the source feature flag, if copied
customWorkflowMetadataobject
Details about the custom workflow, if this approval request is part of a custom workflow

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error