List-based segments
Read time: 7 minutes
Last edited: Sep 21, 2023
Overview
This topic explains how to build and manage list-based segments. List-based segments let you target individual contexts or uploaded lists of contexts.
The process for creating list-based segments varies slightly depending on how large your list is.
You may be familiar with the concept of a "Big Segment," which is a term we previously emphasized in the LaunchDarkly documentation and user interface to describe some segments.
A Big Segment is a segment that is either a synced segment, or an list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.
Most of the time, you don't need to keep track of whether your segment is a Big Segment or not. However, you may need to monitor this if you are working with the REST API. Some of the REST API endpoints are specific to Big Segments. To learn more, read Segments in the API documentation.
Smaller list-based segments
Smaller list-based segments are segments where the number of individual contexts targeted is 15,000 or fewer.
To create a new list-based segment:
- Navigate to the Segments list.
- Click Create segment. The "Create a segment" dialog appears.
- Give your segment a human-readable Name.
- Enter a Key for your segment. This field auto-populates based on the segment name, but you can change it if you like.
- (Optional) Add a Description.
- (Optional) Select or create Tags. Tags help you identify segments used by different teams or for different purposes within your organization.
- Under Size, select "Standard".
- Click Save segment.
After you create the list-based segment, you can add the contexts:
- To add or change the individual targets one at a time, read Targeting individual contexts.
- To add or change the individual targets in sets of up to 1500, read Bulk editing individual contexts.
You can also add targeting rules to a smaller list-based segment. To add or change the targeting rules for your segment, read Targeting contexts with rules.
Larger list-based segments
Larger list-based segments are one kind of Big Segment. Big Segments are available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.
If you are using larger list-based segments and you are also using the Relay Proxy, additional configuration may be required:
- If you use the Relay Proxy with a client-side SDK, the Relay Proxy must be configured to use persistent storage with Redis or DynamoDB.
- If you use a server-side SDK, you must use the Relay Proxy and configure your server-side SDKs to use the same persistent storage as the Relay Proxy.
To learn more, read Big Segments and Configuring the Relay Proxy for Big Segments.
Larger list-based segments are segments where the number of individual contexts targeted may be greater than 15,000. Larger list-based segments can include only one targeted context kind.
To create a new list-based segment:
- Navigate to the Segments list.
- Click Create segment. The "Create a segment" dialog appears.
- Give your segment a human-readable Name.
- Enter a Key for your segment. This field auto-populates based on the segment name, but you can change it if you like.
- (Optional) Add a Description.
- (Optional) Select or create Tags. Tags help you identify segments used by different teams or for different purposes within your organization.
- Under Size, select "Big".
- Select the Context kind from the menu.
- Click Save segment. The segment's Targeting tab appears.
To import context targets from a CSV file:
- From the segment's Targeting tab, click Upload CSV. An "Upload CSV" dialog appears.
- Click Select File.
- Select a CSV file from your computer.
- Click Upload File.
The import process begins in the background. When the import completes successfully, you receive an email notification. Depending on the number of contexts in the CSV, this may take several minutes or hours.
You can also use the REST API: Create Big Segment import
If you are on the Targeting tab of a segment that already contains contexts, you have the option to merge or overwrite the existing contexts with the contexts from the CSV file. If you are merging contexts, they must be of all the same context kind.
- Select "Overwrite" to replace all existing contexts in the segment
- Select "Merge" to add to the existing contexts in the segment
There are some limitations to uploading a CSV. They are:
- The CSV file must not contain a header row. LaunchDarkly reads context keys from the first column of the CSV file.
- LaunchDarkly does not support concurrent imports within a single environment.
- Uploaded CSV files may not exceed 40MB in size and may not contain more than 1 million contexts. All of the contexts must be of the same context kind. If you want to add more than 1 million contexts, you can use the "Merge" option with multiple sequential file uploads.
Add and remove individual targets
After you add context targets to a list-based segment using a CSV file, you can then add or remove individual contexts.
To add or remove individual contexts to or from a larger list-based segment:
- Navigate to the desired segment.
- In the Included targets search box, enter the key of the context you want to add or remove. If the context is present in the segment, a Remove target button appears. If the user is not present in the segment, an Add target button appears.

- Click Add target or Remove target.
- Click Review and save. A "Review and save" dialog appears.
- Click Save changes.
Exporting segments
To export the contexts from a list-based segment into a CSV file:
- Navigate to the Segments list and click the name of the segment you wish to export. The segment's Targeting tab appears.
- Click on the "Included targets" overflow menu.
- Select "Export as CSV."

The export process runs in the background. When it completes, you receive an email notification containing a link to where you can download your CSV file.
LaunchDarkly does not support exporting segments with more than 10 million contexts.
You can also use the REST API: Create Big Segment export