---
title: "PUT (update) a Segment"
method: PUT
path: "/segments/{segment_id}"
tags: ["Segments"]
---

# PUT (update) a Segment

`PUT /segments/{segment_id}`

Use this method to update an existing segment's name (`name`) and/or contact selection criteria (`segment_criteria`). You must specify both the `name` and the `segment_criteria` in the request body, even if you don't plan to update both. The segment's name must be unique and the JSON must be valid (requires single-string escaped JSON). To avoid returning a 400 error response, when specifying the `segment_criteria` do not request more than 500 email campaigns or a date range greater than 1825 days (5 years) be evaluated. For more use case information, see [Update Segment Details](/api_guide/segment_update.html) in the API guide.

## Path parameters

- `segment_id` integer, required

## Request body

- SegmentData
  - `name` string, required — The segment's unique descriptive name.
  - `segment_criteria` string, required — The <code>segment_criteria</code> specifies the contact data that Constant Contact uses to evaluate and identify contacts that meet your criteria. The <code>segment_criteria</code> must be formatted as single-string escaped JSON. The top-level <code>group</code> <code>type</code> must be <code>add</code>.

## Response `200`

The segment was successfully updated.

- SegmentDetail
  - `name` string — The segment's unique descriptive name.
  - `segment_criteria` string — The segment's contact selection criteria formatted as single-string escaped JSON.
  - `segment_id` integer — The system generated number that uniquely identifies the segment.
  - `created_at` string, date-time — The system generated date and time (ISO-8601) that the segment was created.
  - `edited_at` string, date-time — The system generated date and time (ISO-8601) that the segment's <code>name</code> or <code> segment_criteria</code> was last updated.

## Other responses

- `400` — Bad request. Either the JSON was malformed or there was a data validation error.
- `401` — The Access Token used is invalid.
- `403` — Forbidden request. You lack the necessary scopes, you lack the necessary user privileges, or the application is deactivated.
- `404` — The requested resource was not found.
- `409` — Conflict. The resource you are creating or updating conflicts with an existing resource.
- `415` — Unsupported Media Type.
- `500` — There was a problem with our internal service.

---

[API](https://skmtc.net/cc/apis/appconnect-v3.md) · [All operations](https://skmtc.net/cc/apis/appconnect-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cc/appconnect-v3/versions/4b4a534c818d/schema)
