Skip to main content
POST
/
api
/
v2
/
segments
/
{projectKey}
/
{environmentKey}
/
{segmentKey}
/
contexts
Update context targets on a big segment
curl --request POST \
  --url https://app.launchdarkly.com/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "included": {
    "add": [
      "<string>"
    ],
    "remove": [
      "<string>"
    ]
  },
  "excluded": {
    "add": [
      "<string>"
    ],
    "remove": [
      "<string>"
    ]
  }
}
'
{
  "code": "invalid_request",
  "message": "Invalid request body"
}

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

environmentKey
string<string>
required

The environment key

segmentKey
string<string>
required

The segment key

Body

application/json
included
object
excluded
object

Response

Action succeeded