Skip to main content
POST
/
api
/
v2
/
projects
/
{projectKey}
/
environments
/
{environmentKey}
/
segments
/
evaluate
List segment memberships for context instance
curl --request POST \
  --url https://app.launchdarkly.com/api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": {
    "city": "Springfield",
    "street": "123 Main Street"
  },
  "jobFunction": "doctor",
  "key": "context-key-123abc",
  "kind": "user",
  "name": "Sandy"
}
'
{
  "items": [
    {
      "name": "Segment Name",
      "key": "segment-key-123abc",
      "description": "Segment description",
      "unbounded": false,
      "external": "https://amplitude.com/myCohort",
      "isMember": true,
      "isIndividuallyTargeted": true,
      "isRuleTargeted": false,
      "_links": {}
    }
  ],
  "_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

environmentKey
string<string>
required

The environment key

Body

application/json
{key}
any

Response

Context instance segment membership collection response

items
object[]
required

The location and content type of related resources