---
title: "Update Segment"
method: PUT
path: "/segments/{name}"
tags: ["Segments"]
---

# Update Segment

`PUT /segments/{name}`

Rename or change RULE for your segment. Required Access Level: ModifyContacts

## Path parameters

- `name` string, string, required — string

## Request body

- SegmentPayload
  - `Name` string, string, required — Segment name
  - `Rule` string, string, required — SQL-like rule to determine which Contacts belong to this Segment. Help for building a segment rule can be found here: https://help.elasticemail.com/en/articles/5162182-segment-rules

## Response `200`

OK

- Segment — Dynamic collection of Contacts, managed by SQL-like rule.
  - `Name` string, string — Segment name
  - `Rule` string, string — SQL-like rule to determine which Contacts belong to this Segment.

---

[API](https://skmtc.net/elasticemail/apis/megamail-api.md) · [All operations](https://skmtc.net/elasticemail/apis/megamail-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elasticemail/megamail-api/versions/1a0ebb83f676/schema)
