---
title: "Update a segment"
description: "Changes a segment's name, description or filter. A new filter replaces the old one completely."
canonical: https://docs.rumoro.dev/api/segments/update-segment
markdown: https://docs.rumoro.dev/api/segments/update-segment.mdx
---

# Update a segment

`PATCH /v1/segments/{id}`

Changes a segment's name, description or filter. A new filter replaces the old one completely.

## Parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | path, required | The segment's id (seg_...). |

## Body

| Field | Required | Description |
| --- | --- | --- |
| `name` |  |  |
| `description` |  |  |
| `filter` |  | Sets the full new filter. |

## Responses

| Status | Meaning |
| --- | --- |
| 200 | The segment after the change |
| 401 | The API key is missing or not valid |
| 404 | Your workspace has no segment with this id |
| 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).
