Skip to main content
PUT
/
api
/
v2
/
projects
/
{projectKey}
/
flags
/
{flagKey}
/
release
Create a new release for flag
curl --request PUT \
  --url https://app.launchdarkly.com/api/v2/projects/{projectKey}/flags/{flagKey}/release \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "releasePipelineKey": "<string>",
  "releaseVariationId": "<string>"
}
'
{
  "name": "Example release pipeline",
  "releasePipelineKey": "example-release-pipeline",
  "releasePipelineDescription": "Our release pipeline for typical testing and deployment",
  "phases": [
    {
      "_id": "1234a56b7c89d012345e678f",
      "_name": "Phase 1 - Testing",
      "complete": true,
      "_creationDate": "1684262711507",
      "_audiences": [
        {
          "_id": "1234a56b7c89d012345e678g",
          "name": "Phase 1 - Testing",
          "_links": {},
          "environment": {
            "_links": {
              "self": {
                "href": "/api/v2/projects/my-project/environments/my-environment",
                "type": "application/json"
              }
            },
            "key": "environment-key-123abc",
            "name": "My Environment",
            "color": "F5A623"
          },
          "configuration": {
            "releaseStrategy": "monitoredRelease",
            "requireApproval": true,
            "notifyMemberIds": [
              "1234a56b7c89d012345e678f"
            ],
            "notifyTeamKeys": [
              "example-reviewer-team"
            ],
            "releaseGuardianConfiguration": {
              "monitoringWindowMilliseconds": 60000,
              "rolloutWeight": 50,
              "rollbackOnRegression": true,
              "randomizationUnit": "user"
            }
          },
          "segmentKeys": [
            "segment-key-123abc"
          ],
          "status": "active",
          "_ruleIds": [
            "<string>"
          ]
        }
      ],
      "_completionDate": "1684262711509",
      "_completedBy": {
        "member": {
          "_links": {
            "self": {
              "href": "/api/v2/members/569f183514f4432160000007",
              "type": "application/json"
            }
          },
          "_id": "569f183514f4432160000007",
          "role": "admin",
          "email": "ariel@acme.com",
          "firstName": "Ariel",
          "lastName": "Flores"
        },
        "token": {
          "_links": {},
          "_id": "<string>",
          "name": "DevOps token",
          "ending": "2345",
          "serviceToken": false
        }
      },
      "status": "Started",
      "started": true,
      "_startedDate": 123,
      "configuration": {}
    }
  ],
  "_version": 1,
  "_links": {},
  "_releaseVariationId": "<string>",
  "_canceledAt": "1684262711507"
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Path Parameters

projectKey
string<string>
required

The project key

flagKey
string<string>
required

The flag key

Body

application/json
releasePipelineKey
string
required

The key of the release pipeline to attach the flag to

releaseVariationId
string

The variation id to release to across all phases

Response

Release response

name
string
required

The release pipeline name

Example:

"Example release pipeline"

releasePipelineKey
string
required

The release pipeline key

Example:

"example-release-pipeline"

releasePipelineDescription
string
required

The release pipeline description

Example:

"Our release pipeline for typical testing and deployment"

phases
object[]
required

An ordered list of the release pipeline phases

_version
integer
required

The release version

Example:

1

The location and content type of related resources

_releaseVariationId
string

The chosen release variation ID to use across all phases of a release

_canceledAt
integer<int64>

Timestamp of when the release was canceled

Example:

"1684262711507"