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

# Check if Segment Code Exists

> Checks whether a segment `code` is already in use and returns true or false.

Pass `segmentId` to exclude a segment from the check, which is what you want when renaming the code on an existing segment.


## API Specification

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