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
    • 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
      • PUTCreate a new release for flag
      • DELDelete a release for flag
      • GETGet release for flag
      • PATCHPatch release for flag
      • PUTUpdate phase status for release
    • 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 overviewReleases Beta

Patch release for flag

PATCH
/api/v2/flags/:projectKey/:flagKey/release
PATCH
/api/v2/flags/:projectKey/:flagKey/release
$curl -X PATCH https://app.launchdarkly.com/api/v2/flags/projectKey/flagKey/release \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "op": "replace",
> "path": "/phases/0/complete",
> "value": null
> }
>]'
1{
2 "name": "Example release pipeline",
3 "releasePipelineKey": "example-release-pipeline",
4 "releasePipelineDescription": "Our release pipeline for typical testing and deployment",
5 "phases": [
6 {
7 "_id": "1234a56b7c89d012345e678f",
8 "_name": "Phase 1 - Testing",
9 "complete": true,
10 "_creationDate": 1684262711507,
11 "_audiences": [
12 {
13 "_id": "1234a56b7c89d012345e678g",
14 "name": "Phase 1 - Testing",
15 "_links": {},
16 "environment": {
17 "_links": {
18 "self": {
19 "href": "/api/v2/projects/my-project/environments/my-environment",
20 "type": "application/json"
21 }
22 },
23 "key": "environment-key-123abc",
24 "name": "My Environment",
25 "color": "F5A623"
26 },
27 "configuration": {
28 "releaseStrategy": "monitoredRelease",
29 "requireApproval": true,
30 "notifyMemberIds": [
31 "1234a56b7c89d012345e678f"
32 ],
33 "notifyTeamKeys": [
34 "example-reviewer-team"
35 ],
36 "releaseGuardianConfiguration": {
37 "monitoringWindowMilliseconds": 60000,
38 "rolloutWeight": 50,
39 "rollbackOnRegression": true,
40 "randomizationUnit": "user"
41 }
42 },
43 "segmentKeys": [
44 "segment-key-123abc"
45 ],
46 "status": "active",
47 "_ruleIds": [
48 "string"
49 ]
50 }
51 ],
52 "_completionDate": 1684262711509,
53 "_completedBy": {
54 "member": {
55 "_links": {
56 "self": {
57 "href": "/api/v2/members/569f183514f4432160000007",
58 "type": "application/json"
59 }
60 },
61 "_id": "569f183514f4432160000007",
62 "role": "admin",
63 "email": "ariel@acme.com",
64 "firstName": "Ariel",
65 "lastName": "Flores"
66 },
67 "token": {
68 "_links": {},
69 "_id": "string",
70 "name": "DevOps token",
71 "ending": "2345",
72 "serviceToken": false
73 }
74 },
75 "status": "Started",
76 "started": true,
77 "_startedDate": 1,
78 "configuration": {}
79 }
80 ],
81 "_version": 1,
82 "_links": {},
83 "_releaseVariationId": "string",
84 "_canceledAt": 1684262711507
85}
This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/releases-beta/update-phase-status) endpoint. Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { "op": "replace", "path": "/phase/0/complete", "value": true } ] ```
Was this page helpful?
Previous

Update phase status for release

Next
Built with

This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the Update phase status for release endpoint.

Update currently active release for a flag. Updating releases requires the JSON patch format. To learn more, read Updates.

You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the path. For example, to mark the first phase of a release as complete, use the following request body:

[
{
"op": "replace",
"path": "/phase/0/complete",
"value": true
}
]

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequiredformat: "string"
The project key
flagKeystringRequiredformat: "string"
The flag key

Request

This endpoint expects a list of objects.
opstringRequired
The type of operation to perform
pathstringRequired
A JSON Pointer string specifying the part of the document to operate on
valueanyOptional
A JSON value used in "add", "replace", and "test" operations

Response

Release response
namestring
The release pipeline name
releasePipelineKeystring
The release pipeline key
releasePipelineDescriptionstring
The release pipeline description
phaseslist of objects
An ordered list of the release pipeline phases
_versioninteger
The release version
_linksmap from strings to objects
The location and content type of related resources
_releaseVariationIdstring
The chosen release variation ID to use across all phases of a release
_canceledAtlong
Timestamp of when the release was canceled

Errors

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