> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating segments

<View title="Developer" />

<View title="Federal docs" />

<View title="EU docs" />

This topic explains how to create rule-based, smaller list-based, larger list-based, and synced segments. To learn about the differences between these, read [Segment types](/docs/home/flags/segment-types).

## Create rule-based and smaller list-based segments

To create a new rule-based or smaller list-based segment:

1. Click **Create** and choose **Segment**. The "Create a segment" dialog appears.

* If you're on an Enterprise plan, choose **Rule based-segments** or **List-based segments**.
* If you're on a Developer or Foundation plan, or on an older Pro plan, continue entering the segment's details.

<Frame caption="The &#x22;Create&#x22; menu options.">
  <img src="https://mintcdn.com/launchdarkly/-b7nPh0oyigf6iW7/images/auto/create-menu.auto.png?fit=max&auto=format&n=-b7nPh0oyigf6iW7&q=85&s=5b3fe40c4dd161b2972de2334ff19c0a" alt="The &#x22;Create&#x22; menu options." width="1180" height="440" data-path="images/auto/create-menu.auto.png" />
</Frame>

2. Give your segment a human-readable **Name**.
3. Enter a **Key** for your segment. This field auto-populates based on the segment name, but you can change it if you like.
4. (Optional) Add a **Description**.
5. (Optional) Select or create **Tags**. Tags help you identify segments used by different teams or for different purposes within your organization.
6. (Optional) Click **Add views** to link the segment to one or more views. If your project requires segments to be associated with a view, you must select at least one view. To learn more, read [Views](/docs/home/account/views).
7. If you chose **List-based segments** in step 2, under "How many individual targets will be in your list?" select **15,000 or fewer**:

<Frame caption="A portion of the &#x22;Create a segment&#x22; dialog, showing a question about the size of the list-based segment.">
  <img src="https://mintcdn.com/launchdarkly/WYiCaDy82H6mz_dK/images/auto/segments-create-how-many-in-list-small.auto.png?fit=max&auto=format&n=WYiCaDy82H6mz_dK&q=85&s=b91952e75d007319f408cd228494e6a3" alt="A portion of the &#x22;Create a segment&#x22; dialog, showing a question about the size of the list-based segment." width="1672" height="322" data-path="images/auto/segments-create-how-many-in-list-small.auto.png" />
</Frame>

8. Click **Save segment**. The segment's details page appears.

After you create the segment, you can add contexts in the following ways:

* To add targeting rules, read [Target contexts with rules](/docs/home/flags/rule-based-segments#target-contexts-with-rules).
* To add or change the individual targets one at a time, read [Target individual contexts](/docs/home/flags/rule-based-segments#target-individual-contexts).
* To add or change the individual targets in sets of up to 1500, read [Bulk edit individual contexts](/docs/home/flags/rule-based-segments#bulk-edit-individual-contexts).

## Create larger list-based segments

Before you create a larger list-based segment, you must create a comma-separated values (CSV) file containing the list of context keys you wish to include. The only data required for the CSV file is a list of context keys in the first column. You can add additional data in subsequent columns if you wish.

The CSV file has the following requirements:

* All of the contexts in the CSV file must be of the same context kind.
* The context keys must be in the first column of the CSV file. No other data is required.
* The CSV file must not contain a header row.
* The CSV file must not exceed 40MB in size.
* The CSV file must not contain more than 1 million contexts.
  * If you want to add more than 1 million contexts, you can use the "Merge" option with multiple sequential file uploads. To learn more, read [Segments with existing contexts](/docs/home/flags/list-based-segments#segments-with-existing-contexts).
  * You must upload multiple CSV files one at a time, as you cannot perform concurrent imports within a single environment.

To create a new larger list-based segment:

1. Click **Create** and choose **Segment**. The "Create a segment" dialog appears.

<Frame caption="The &#x22;Select a segment kind&#x22; step of the &#x22;Create a new segment&#x22; dialog">
  <img src="https://mintcdn.com/launchdarkly/A4UXoRTW8ATNw4yq/images/auto/segments-create-step-one.auto.png?fit=max&auto=format&n=A4UXoRTW8ATNw4yq&q=85&s=3779b1bcf021eb44b2c046500b6957d3" alt="The &#x22;Select a segment kind&#x22; step of the &#x22;Create a new segment&#x22; dialog" width="1800" height="908" data-path="images/auto/segments-create-step-one.auto.png" />
</Frame>

2. In the "Select a segment kind" step, choose **List-based segments**. The "Enter segment details" step appears.
3. Give your segment a human-readable **Name**.
4. Enter a **Key** for your segment. This field auto-populates based on the segment name, but you can change it if you like.
5. (Optional) Add a **Description**.
6. (Optional) Select or create **Tags**. Tags help you identify segments used by different teams or for different purposes within your organization.
7. (Optional) Click **Add views** to link the segment to one or more views. If your project requires segments to be associated with a view, you must select at least one view. To learn more, read [Views](/docs/home/account/views).
8. Under "How many individual targets will be in your list?", select "More than 15,000":

<Frame caption="A portion of the &#x22;Create a segment&#x22; dialog, showing a question about the size of the list-based segment.">
  <img src="https://mintcdn.com/launchdarkly/A4UXoRTW8ATNw4yq/images/auto/segments-create-how-many-in-list-large.auto.png?fit=max&auto=format&n=A4UXoRTW8ATNw4yq&q=85&s=f52b48357aec6d00f2acfc558dae9bc9" alt="A portion of the &#x22;Create a segment&#x22; dialog, showing a question about the size of the list-based segment." width="1672" height="462" data-path="images/auto/segments-create-how-many-in-list-large.auto.png" />
</Frame>

9. Select the **Context kind** from the menu.
10. Click **Save segment**. The segment's details page and the "Upload CSV" dialog appear.
11. In the "Upload CSV" dialog, click **Select file** to browse for a CSV file that lists context keys for the selected context kind in its first column.
12. In the "Upload CSV" dialog:

* To add the file immediately, click **Upload file**.
* To request approval, check the **Request approval** checkbox. Enter a **Comment** to add details that help your reviewers understand the changes you made. Next, choose one or more reviewers from the **Reviewers** menu. Then, click **Request approval**. To learn more about the approval process, read [Requesting approvals](/docs/home/releases/approval-requests).

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.

Alternatively, you can click **Cancel** from the "Upload CSV" dialog and upload your CSV at a later time.

<Card icon="https://mintcdn.com/launchdarkly/YIC2H8XW-fomhquw/assets/icons/openapi-logo.svg?fit=max&auto=format&n=YIC2H8XW-fomhquw&q=85&s=dd9578a9668a86e1a8b8c314921f204c" horizontal width="2500" height="2452" data-path="assets/icons/openapi-logo.svg">
  You can also use the REST API: [Create big segment import](/docs/api/segments/create-big-segment-import)
</Card>

## Create synced segments

To learn how to create synced segments, read [Segments synced from external tools](/docs/home/flags/synced-segments).
