Skip to main content
PATCH
/
api
/
v2
/
projects
/
{projectKey}
/
flag-defaults
Update flag default for project
curl --request PATCH \
  --url https://app.launchdarkly.com/api/v2/projects/{projectKey}/flag-defaults \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "op": "replace",
    "path": "/exampleField",
    "value": "new example value"
  }
]
'
{
  "tags": [
    "tag-1",
    "tag-2"
  ],
  "temporary": true,
  "booleanDefaults": {
    "trueDisplayName": "True",
    "falseDisplayName": "False",
    "trueDescription": "serve true",
    "falseDescription": "serve false",
    "onVariation": 0,
    "offVariation": 1
  },
  "defaultClientSideAvailability": {
    "usingMobileKey": true,
    "usingEnvironmentId": true
  },
  "_links": {}
}

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

Body

application/json
op
string
required

The type of operation to perform

Example:

"replace"

path
string
required

A JSON Pointer string specifying the part of the document to operate on

Example:

"/exampleField"

value
any

A JSON value used in "add", "replace", and "test" operations

Example:

"new example value"

Response

Flag default response

tags
string[]
required

A list of default tags for each flag

Example:
["tag-1", "tag-2"]
temporary
boolean
required

Whether the flag should be temporary by default

Example:

true

booleanDefaults
object
required
defaultClientSideAvailability
object
required

Which client-side SDK types can use this flag by default.

The location and content type of related resources