---
title: "Get expiring user targets for feature flag"
method: GET
path: "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}"
tags: ["Feature flags"]
---

# Get expiring user targets for feature flag

`GET /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}`

> ### Contexts are now available
>
> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring context targets for feature flag](https://launchdarkly.com/docs/api/feature-flags/get-expiring-context-targets) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts).

Get a list of user targets on a feature flag that are scheduled for removal.

## Path parameters

- `projectKey` string, string, required — The project key
- `environmentKey` string, string, required — The environment key
- `featureFlagKey` string, string, required — The feature flag key

## Response `200`

Expiring user target response

- ExpiringUserTargetGetResponse
  - `items` ExpiringUserTargetItem[], required — An array of expiring user targets
    - `_id` string, required — The ID of this expiring user target
    - `_version` integer, required — The version of this expiring user target
    - `expirationDate` integer, required
    - `userKey` string, required — A unique key used to represent the user
    - `targetType` string — A segment's target type. Included when expiring user targets are updated on a segment.
    - `variationId` string — A unique key used to represent the flag variation. Included when expiring user targets are updated on a feature flag.
    - `_resourceId` ResourceIDResponse, required
      - `kind` string
      - `projectKey` string
      - `environmentKey` string
      - `flagKey` string
      - `key` string
  - `_links` object — The location and content type of related resources

## Other responses

- `401` — Invalid access token
- `403` — Forbidden
- `404` — Invalid resource identifier
- `429` — Rate limited

---

[API](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/revisions/69c5c9aafe78/schema)
