---
title: "Update a segment"
method: PUT
path: "/v1/segments/{segment.id}"
tags: ["segment"]
---

# Update a segment

`PUT /v1/segments/{segment.id}`

This endpoint updates the details of an existing segment using the provided segment data.

## Path parameters

- `segment.id` string, required

## Request body

- SegmentServiceUpdateSegmentBody
  - `segment` object
    - `segmentId` string — The identifier of the segment.
    - `sourceId` string — The identifier the source where the segment came from.
    - `name` string — The name of the campaign.
    - `description` string — Meaningful description of the segment.
    - `category` string[] — The category to which segment belongs.
    - `retailerTeamId` string — The identifier of the retailer that owns the segment.

## Response `200`

The updated segment

- V1UpdateSegmentResponse
  - `segment` V1Segment, required
    - `id` string
    - `segmentId` string — The identifier of the segment.
    - `sourceId` string — The identifier the source where the segment came from.
    - `name` string — The name of the campaign.
    - `description` string — Meaningful description of the segment.
    - `category` string[] — The category to which segment belongs.
    - `retailerTeamId` string — The identifier of the retailer that owns the segment.

## Other responses

- `400` — There was a problem with input.
- `401` — Login failed or token not valid.
- `403` — Login failed or token not valid.
- `404` — Segment for specified id does not exist.
- `default` — An unexpected error response.

---

[API](https://skmtc.net/citrusad/apis/citrus-auth-api.md) · [All operations](https://skmtc.net/citrusad/apis/citrus-auth-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/citrusad/citrus-auth-api/revisions/a040003c7378/schema)
