---
title: "Edit Segment"
method: PATCH
path: "/v3/lists/{listId}/segments/{segmentId}"
tags: ["Segments"]
---

# Edit Segment

`PATCH /v3/lists/{listId}/segments/{segmentId}`

This endpoint helps you to <b>partially<b> update an existing segment from a list identified by its unique ID (it edits only the fields sent in the request).

## Path parameters

- `listId` integer, required
- `segmentId` string, required

## Request body

- string

## Response `200`

Successfully edited the segment

- SegmentResponse
  - `meta` MetadataDTO
    - `timestamp` integer, required — Transaction's date in timestamp
    - `transactionId` string, required — Id for the current transaction (Endpoint's call)
    - `explain` string — Explain string in case of failure
  - `data` Segment — list of segments
    - `id` string, required — segment id
    - `name` string, required — name of the segmnet
    - `userName` string — owner of the segment
    - `listId` integer, required — list id
    - `queryRule` string — segment condition
    - `total` integer, required — total of contacts in segment

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.net/messangi/apis/raven.md) · [All operations](https://skmtc.net/messangi/apis/raven/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/messangi/raven/versions/c87f398fa338/schema)
