v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
Segments

List segment memberships for context instance

For a given context instance with attributes, get membership details for all segments. In the request body, pass in the context instance.

post/api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate

Path parameters

projectKeystring string required

The project key

The project key

environmentKeystring string required

The environment key

The environment key

Request body

ContextInstance required

Response

Context instance segment membership collection response

_linksobject required

The location and content type of related resources

Example response

{
  "items": [
    {
      "name": "Segment Name",
      "key": "segment-key-123abc",
      "description": "Segment description",
      "external": "https://amplitude.com/myCohort",
      "isMember": true,
      "isIndividuallyTargeted": true
    }
  ]
}