> ## 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.

# Create a Segment

> Creates a segment to track giving within a campaign.

Send the `campaignId`, a `name`, and the `code` you will use to attribute gifts to it, plus an `externalIdentifier` if you match segments to records in another system. Returns the created segment with its new `id`.


## API Specification

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