---
title: "Create a segment"
description: "Saves a people filter under a name. Names are unique in the workspace (409). The response says how many people match now."
canonical: https://docs.rumoro.dev/api/segments/create-segment
markdown: https://docs.rumoro.dev/api/segments/create-segment.mdx
---

# Create a segment

`POST /v1/segments`

Saves a people filter under a name. Names are unique in the workspace (409). The response says how many people match now.

## Body

| Field | Required | Description |
| --- | --- | --- |
| `name` | yes |  |
| `description` |  |  |
| `filter` |  |  |

## Responses

| Status | Meaning |
| --- | --- |
| 201 | The new segment and how many people are in it |
| 400 | The body is not valid |
| 401 | The API key is missing or not valid |
| 409 | This name is already used by a segment |

The [OpenAPI document](https://api.rumoro.dev/v1/openapi.json) has every schema. Rules shared by all endpoints are in [Conventions](https://docs.rumoro.dev/conventions.mdx).
