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

# CreateSegmentInput

> Describes a new segment to create.



**Kind**: `input`

## Fields

**`description`**: `String`

Free-text note about the segment.

---

**`endTime`**: `DateTime`

When the segment is archived: on the hour and after `startTime`. Null = never archived on a schedule.

---

**`image`**: `String`

Image key, lowercase letters a-z only.

---

**`language`**: `String!` (required)

Language code the criteria use for localized card properties (e.g. `en`).

---

**`name`**: `String!` (required)

Name of the segment.

---

**`searchCriteria`**: `[JSON!]!` (required)

Criteria that pick the segment's cards: a list of JSON objects in the `Segment.searchCriteria` shape, with camelCase keys. A `QUERY` segment needs at least one; a `FIXED` segment takes exactly one `ids` item with `include` only. Example: `[{"operator":"hasValue","propertyId":"ean","invert":false}]`.

---

**`segmentId`**: `ID!` (required)

Global id for the new segment: base64 of `Segment:<segment id>:<segment definition id>`. The segment id is new, camelCase letters and digits (e.g. `summerSale`); the segment definition id is the raw id of the segment definition the segment joins.

---

**`startTime`**: `DateTime`

When the segment becomes active: on the hour and in the future. A start more than 2 minutes ahead creates a `SCHEDULED` segment. Null = active right away.

---

**`tags`**: `[String!]!` (required)

Labels for grouping and filtering segments: alphanumeric, no duplicates. Pass `[]` for none.

---

**`type`**: `SegmentType!` (required)

How the segment picks its cards. Can't change later.



This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.