---
title: "Update a segment"
canonical: https://docs.mentio.dev/api/segments/update-segment
markdown: https://docs.mentio.dev/api/segments/update-segment.mdx
---

# Update a segment

`PATCH /v1/segments/{id}`

## Parameters

- `id` (path, required): Segment id (seg_...).

## Body

- `name`: string
- `description`: string
- `filter`: Replaces the whole filter.

## Responses

- 200: The updated segment
- 401: Missing or invalid API key
- 404: No such segment for your workspace
- 409: A segment with this name already exists

Full schemas: https://api.mentio.dev/v1/openapi.json. Conventions: https://docs.mentio.dev/conventions.mdx
