---
title: "Update segment"
method: PATCH
path: "/orgs/segments/{segment_id}"
tags: ["Segments"]
---

# Update segment

`PATCH /orgs/segments/{segment_id}`

## Request

- Base URL: `https://api.useinvent.com`
- URL: `https://api.useinvent.com/orgs/segments/{segment_id}`
- Auth: HTTP bearer

Update a specific segment by its ID.

## Path parameters

- `segment_id` string, required

## Request body

- UpdateSegmentSchema: Schema for updating a segment
  - `name` string: Name of the segment
  - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral': Accent color, by name

## Response `200`

- SegmentSchema: Schema for the segment
  - `id` string, required
  - `name` string, required
  - `color` 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'neutral', required: Accent color, by name
  - `contacts_count` number, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

---

[API](https://skmtc.dev/useinvent/apis/invent-api.md) · [All operations](https://skmtc.dev/useinvent/apis/invent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useinvent/apis/invent-api/revisions/98824f3fde82?raw)
