> ## Documentation Index
> Fetch the complete documentation index at: https://docs.virtuous.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a Segment

> Updates a segment.

Change its `name`, `description`, `code`, `externalIdentifier`, or the `campaignId` it belongs to. Returns the updated segment.

<Note>Check a new code with Check if Segment Exists first.</Note>


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.virtuous.org/llms.txt).
