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

# Create segment

> Create a new segment



## OpenAPI

````yaml https://api.getcargo.io/openapi.json post /segmentation/segments
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /segmentation/segments:
    post:
      tags:
        - Segmentation - Segments
      summary: Create segment
      description: Create a new segment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  title: Name
                  description: Segment name.
                modelUuid:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                  title: Model UUID
                  description: Model identifier.
                filter:
                  title: Filter
                  description: Segment filter criteria.
                  type: object
                  properties:
                    conjonction:
                      type: string
                      enum:
                        - or
                        - and
                    groups:
                      type: array
                      items:
                        type: object
                        properties:
                          conjonction:
                            type: string
                            enum:
                              - or
                              - and
                          conditions:
                            type: array
                            items:
                              anyOf:
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: sql
                                    name:
                                      type: string
                                    clause:
                                      type: string
                                  required:
                                    - kind
                                    - name
                                    - clause
                                - allOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          const: string
                                        relatedModelUuid:
                                          type: string
                                        columnSlug:
                                          type: string
                                      required:
                                        - kind
                                        - columnSlug
                                    - anyOf:
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - is
                                                - isNot
                                                - contains
                                                - doesNotContain
                                                - startsWith
                                                - endsWith
                                            values:
                                              anyOf:
                                                - type: string
                                                - type: array
                                                  items:
                                                    type: string
                                          required:
                                            - operator
                                            - values
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - isNull
                                                - isNotNull
                                                - isEmpty
                                                - isNotEmpty
                                          required:
                                            - operator
                                - allOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          const: number
                                        relatedModelUuid:
                                          type: string
                                        columnSlug:
                                          type: string
                                      required:
                                        - kind
                                        - columnSlug
                                    - anyOf:
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - is
                                                - isNot
                                                - greaterThan
                                                - lowerThan
                                            value:
                                              type: number
                                          required:
                                            - operator
                                            - value
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              const: between
                                            firstValue:
                                              type: number
                                            lastValue:
                                              type: number
                                          required:
                                            - operator
                                            - firstValue
                                            - lastValue
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - isNull
                                                - isNotNull
                                          required:
                                            - operator
                                - allOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          const: objectProperty
                                        relatedModelUuid:
                                          type: string
                                        columnSlug:
                                          type: string
                                        propertyName:
                                          type: string
                                      required:
                                        - kind
                                        - columnSlug
                                        - propertyName
                                    - anyOf:
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - is
                                                - isNot
                                                - contains
                                                - greaterThan
                                                - lowerThan
                                                - doesNotContain
                                                - startsWith
                                                - endsWith
                                            value:
                                              type: string
                                          required:
                                            - operator
                                            - value
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - isNull
                                                - isNotNull
                                                - isEmpty
                                                - isNotEmpty
                                          required:
                                            - operator
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              const: between
                                            value:
                                              type: string
                                            otherValue:
                                              type: string
                                          required:
                                            - operator
                                            - value
                                            - otherValue
                                - allOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          const: object
                                        relatedModelUuid:
                                          type: string
                                        columnSlug:
                                          type: string
                                      required:
                                        - kind
                                        - columnSlug
                                    - anyOf:
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              const: isNull
                                          required:
                                            - operator
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              const: isNotNull
                                          required:
                                            - operator
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              const: matchConditions
                                            conjonction:
                                              type: string
                                              enum:
                                                - or
                                                - and
                                            propertyConditions:
                                              type: array
                                              items:
                                                allOf:
                                                  - type: object
                                                    properties:
                                                      kind:
                                                        type: string
                                                        const: objectProperty
                                                      relatedModelUuid:
                                                        type: string
                                                      columnSlug:
                                                        type: string
                                                      propertyName:
                                                        type: string
                                                    required:
                                                      - kind
                                                      - columnSlug
                                                      - propertyName
                                                  - anyOf:
                                                      - type: object
                                                        properties:
                                                          operator:
                                                            type: string
                                                            enum:
                                                              - is
                                                              - isNot
                                                              - contains
                                                              - greaterThan
                                                              - lowerThan
                                                              - doesNotContain
                                                              - startsWith
                                                              - endsWith
                                                          value:
                                                            type: string
                                                        required:
                                                          - operator
                                                          - value
                                                      - type: object
                                                        properties:
                                                          operator:
                                                            type: string
                                                            enum:
                                                              - isNull
                                                              - isNotNull
                                                              - isEmpty
                                                              - isNotEmpty
                                                        required:
                                                          - operator
                                                      - type: object
                                                        properties:
                                                          operator:
                                                            type: string
                                                            const: between
                                                          value:
                                                            type: string
                                                          otherValue:
                                                            type: string
                                                        required:
                                                          - operator
                                                          - value
                                                          - otherValue
                                          required:
                                            - operator
                                            - conjonction
                                            - propertyConditions
                                - allOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          const: array
                                        relatedModelUuid:
                                          type: string
                                        columnSlug:
                                          type: string
                                      required:
                                        - kind
                                        - columnSlug
                                    - anyOf:
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              const: isNull
                                          required:
                                            - operator
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              const: isNotNull
                                          required:
                                            - operator
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              const: matchConditions
                                            conjonction:
                                              type: string
                                              enum:
                                                - or
                                                - and
                                            propertyConditions:
                                              type: array
                                              items:
                                                allOf:
                                                  - type: object
                                                    properties:
                                                      kind:
                                                        type: string
                                                        const: objectProperty
                                                      relatedModelUuid:
                                                        type: string
                                                      columnSlug:
                                                        type: string
                                                      propertyName:
                                                        type: string
                                                    required:
                                                      - kind
                                                      - columnSlug
                                                      - propertyName
                                                  - anyOf:
                                                      - type: object
                                                        properties:
                                                          operator:
                                                            type: string
                                                            enum:
                                                              - is
                                                              - isNot
                                                              - contains
                                                              - greaterThan
                                                              - lowerThan
                                                              - doesNotContain
                                                              - startsWith
                                                              - endsWith
                                                          value:
                                                            type: string
                                                        required:
                                                          - operator
                                                          - value
                                                      - type: object
                                                        properties:
                                                          operator:
                                                            type: string
                                                            enum:
                                                              - isNull
                                                              - isNotNull
                                                              - isEmpty
                                                              - isNotEmpty
                                                        required:
                                                          - operator
                                                      - type: object
                                                        properties:
                                                          operator:
                                                            type: string
                                                            const: between
                                                          value:
                                                            type: string
                                                          otherValue:
                                                            type: string
                                                        required:
                                                          - operator
                                                          - value
                                                          - otherValue
                                          required:
                                            - operator
                                            - conjonction
                                            - propertyConditions
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: any
                                    relatedModelUuid:
                                      type: string
                                    columnSlug:
                                      type: string
                                    operator:
                                      type: string
                                      enum:
                                        - isNull
                                        - isNotNull
                                  required:
                                    - kind
                                    - columnSlug
                                    - operator
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: vector
                                    relatedModelUuid:
                                      type: string
                                    columnSlug:
                                      type: string
                                    operator:
                                      type: string
                                      enum:
                                        - isNull
                                        - isNotNull
                                  required:
                                    - kind
                                    - columnSlug
                                    - operator
                                - allOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          const: date
                                        relatedModelUuid:
                                          type: string
                                        columnSlug:
                                          type: string
                                      required:
                                        - kind
                                        - columnSlug
                                    - anyOf:
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - is
                                                - isNot
                                                - greaterThan
                                                - lowerThan
                                            value:
                                              type: string
                                          required:
                                            - operator
                                            - value
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              const: between
                                            firstValue:
                                              type: string
                                            lastValue:
                                              type: string
                                          required:
                                            - operator
                                            - firstValue
                                            - lastValue
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - isNull
                                                - isNotNull
                                          required:
                                            - operator
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: boolean
                                    relatedModelUuid:
                                      type: string
                                    columnSlug:
                                      type: string
                                    operator:
                                      type: string
                                      enum:
                                        - isTrue
                                        - isFalse
                                        - isNull
                                        - isNotNull
                                  required:
                                    - kind
                                    - columnSlug
                                    - operator
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: occurrence
                                    relatedModelUuid:
                                      type: string
                                    frequency:
                                      anyOf:
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              const: not
                                          required:
                                            - operator
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - moreThan
                                                - lessThan
                                                - exactly
                                            value:
                                              type: number
                                          required:
                                            - operator
                                            - value
                                    period:
                                      type: object
                                      properties:
                                        operator:
                                          type: string
                                          enum:
                                            - lessThan
                                            - moreThan
                                            - exactly
                                        value:
                                          type: number
                                        unit:
                                          type: string
                                          const: day
                                      required:
                                        - operator
                                        - value
                                        - unit
                                    conjonction:
                                      type: string
                                      enum:
                                        - or
                                        - and
                                    conditions:
                                      type: array
                                      items:
                                        anyOf:
                                          - allOf:
                                              - type: object
                                                properties:
                                                  kind:
                                                    type: string
                                                    const: string
                                                  relatedModelUuid:
                                                    type: string
                                                  columnSlug:
                                                    type: string
                                                required:
                                                  - kind
                                                  - columnSlug
                                              - anyOf:
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        enum:
                                                          - is
                                                          - isNot
                                                          - contains
                                                          - doesNotContain
                                                          - startsWith
                                                          - endsWith
                                                      values:
                                                        anyOf:
                                                          - type: string
                                                          - type: array
                                                            items:
                                                              type: string
                                                    required:
                                                      - operator
                                                      - values
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        enum:
                                                          - isNull
                                                          - isNotNull
                                                          - isEmpty
                                                          - isNotEmpty
                                                    required:
                                                      - operator
                                          - allOf:
                                              - type: object
                                                properties:
                                                  kind:
                                                    type: string
                                                    const: number
                                                  relatedModelUuid:
                                                    type: string
                                                  columnSlug:
                                                    type: string
                                                required:
                                                  - kind
                                                  - columnSlug
                                              - anyOf:
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        enum:
                                                          - is
                                                          - isNot
                                                          - greaterThan
                                                          - lowerThan
                                                      value:
                                                        type: number
                                                    required:
                                                      - operator
                                                      - value
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        const: between
                                                      firstValue:
                                                        type: number
                                                      lastValue:
                                                        type: number
                                                    required:
                                                      - operator
                                                      - firstValue
                                                      - lastValue
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        enum:
                                                          - isNull
                                                          - isNotNull
                                                    required:
                                                      - operator
                                          - allOf:
                                              - type: object
                                                properties:
                                                  kind:
                                                    type: string
                                                    const: object
                                                  relatedModelUuid:
                                                    type: string
                                                  columnSlug:
                                                    type: string
                                                required:
                                                  - kind
                                                  - columnSlug
                                              - anyOf:
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        const: isNull
                                                    required:
                                                      - operator
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        const: isNotNull
                                                    required:
                                                      - operator
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        const: matchConditions
                                                      conjonction:
                                                        type: string
                                                        enum:
                                                          - or
                                                          - and
                                                      propertyConditions:
                                                        type: array
                                                        items:
                                                          allOf:
                                                            - type: object
                                                              properties:
                                                                kind:
                                                                  type: string
                                                                  const: objectProperty
                                                                relatedModelUuid:
                                                                  type: string
                                                                columnSlug:
                                                                  type: string
                                                                propertyName:
                                                                  type: string
                                                              required:
                                                                - kind
                                                                - columnSlug
                                                                - propertyName
                                                            - anyOf:
                                                                - type: object
                                                                  properties:
                                                                    operator:
                                                                      type: {}
                                                                      enum: {}
                                                                    value:
                                                                      type: {}
                                                                  required:
                                                                    - operator
                                                                    - value
                                                                - type: object
                                                                  properties:
                                                                    operator:
                                                                      type: {}
                                                                      enum: {}
                                                                  required:
                                                                    - operator
                                                                - type: object
                                                                  properties:
                                                                    operator:
                                                                      type: {}
                                                                      const: {}
                                                                    value:
                                                                      type: {}
                                                                    otherValue:
                                                                      type: {}
                                                                  required:
                                                                    - operator
                                                                    - value
                                                                    - otherValue
                                                    required:
                                                      - operator
                                                      - conjonction
                                                      - propertyConditions
                                          - allOf:
                                              - type: object
                                                properties:
                                                  kind:
                                                    type: string
                                                    const: array
                                                  relatedModelUuid:
                                                    type: string
                                                  columnSlug:
                                                    type: string
                                                required:
                                                  - kind
                                                  - columnSlug
                                              - anyOf:
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        const: isNull
                                                    required:
                                                      - operator
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        const: isNotNull
                                                    required:
                                                      - operator
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        const: matchConditions
                                                      conjonction:
                                                        type: string
                                                        enum:
                                                          - or
                                                          - and
                                                      propertyConditions:
                                                        type: array
                                                        items:
                                                          allOf:
                                                            - type: object
                                                              properties:
                                                                kind:
                                                                  type: string
                                                                  const: objectProperty
                                                                relatedModelUuid:
                                                                  type: string
                                                                columnSlug:
                                                                  type: string
                                                                propertyName:
                                                                  type: string
                                                              required:
                                                                - kind
                                                                - columnSlug
                                                                - propertyName
                                                            - anyOf:
                                                                - type: object
                                                                  properties:
                                                                    operator:
                                                                      type: {}
                                                                      enum: {}
                                                                    value:
                                                                      type: {}
                                                                  required:
                                                                    - operator
                                                                    - value
                                                                - type: object
                                                                  properties:
                                                                    operator:
                                                                      type: {}
                                                                      enum: {}
                                                                  required:
                                                                    - operator
                                                                - type: object
                                                                  properties:
                                                                    operator:
                                                                      type: {}
                                                                      const: {}
                                                                    value:
                                                                      type: {}
                                                                    otherValue:
                                                                      type: {}
                                                                  required:
                                                                    - operator
                                                                    - value
                                                                    - otherValue
                                                    required:
                                                      - operator
                                                      - conjonction
                                                      - propertyConditions
                                          - type: object
                                            properties:
                                              kind:
                                                type: string
                                                const: any
                                              relatedModelUuid:
                                                type: string
                                              columnSlug:
                                                type: string
                                              operator:
                                                type: string
                                                enum:
                                                  - isNull
                                                  - isNotNull
                                            required:
                                              - kind
                                              - columnSlug
                                              - operator
                                          - type: object
                                            properties:
                                              kind:
                                                type: string
                                                const: vector
                                              relatedModelUuid:
                                                type: string
                                              columnSlug:
                                                type: string
                                              operator:
                                                type: string
                                                enum:
                                                  - isNull
                                                  - isNotNull
                                            required:
                                              - kind
                                              - columnSlug
                                              - operator
                                          - allOf:
                                              - type: object
                                                properties:
                                                  kind:
                                                    type: string
                                                    const: date
                                                  relatedModelUuid:
                                                    type: string
                                                  columnSlug:
                                                    type: string
                                                required:
                                                  - kind
                                                  - columnSlug
                                              - anyOf:
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        enum:
                                                          - is
                                                          - isNot
                                                          - greaterThan
                                                          - lowerThan
                                                      value:
                                                        type: string
                                                    required:
                                                      - operator
                                                      - value
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        const: between
                                                      firstValue:
                                                        type: string
                                                      lastValue:
                                                        type: string
                                                    required:
                                                      - operator
                                                      - firstValue
                                                      - lastValue
                                                  - type: object
                                                    properties:
                                                      operator:
                                                        type: string
                                                        enum:
                                                          - isNull
                                                          - isNotNull
                                                    required:
                                                      - operator
                                          - type: object
                                            properties:
                                              kind:
                                                type: string
                                                const: boolean
                                              relatedModelUuid:
                                                type: string
                                              columnSlug:
                                                type: string
                                              operator:
                                                type: string
                                                enum:
                                                  - isTrue
                                                  - isFalse
                                                  - isNull
                                                  - isNotNull
                                            required:
                                              - kind
                                              - columnSlug
                                              - operator
                                  required:
                                    - kind
                                    - relatedModelUuid
                                    - frequency
                                    - period
                                    - conjonction
                                    - conditions
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: enrollment
                                    workflowUuid:
                                      type: string
                                    activityKind:
                                      type: string
                                      enum:
                                        - workflowEntered
                                        - workflowNodeExecuted
                                        - workflowLeft
                                    nodeSlug:
                                      type: string
                                    frequency:
                                      anyOf:
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              const: not
                                          required:
                                            - operator
                                        - type: object
                                          properties:
                                            operator:
                                              type: string
                                              enum:
                                                - moreThan
                                                - lessThan
                                                - exactly
                                            value:
                                              type: number
                                          required:
                                            - operator
                                            - value
                                    period:
                                      type: object
                                      properties:
                                        operator:
                                          type: string
                                          enum:
                                            - lessThan
                                            - moreThan
                                            - exactly
                                        value:
                                          type: number
                                        unit:
                                          type: string
                                          const: day
                                      required:
                                        - operator
                                        - value
                                        - unit
                                  required:
                                    - kind
                                    - workflowUuid
                                    - activityKind
                                    - frequency
                                    - period
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: segment
                                    segmentUuid:
                                      type: string
                                    operator:
                                      type: string
                                      enum:
                                        - in
                                        - notIn
                                  required:
                                    - kind
                                    - segmentUuid
                                    - operator
                        required:
                          - conjonction
                          - conditions
                  required:
                    - conjonction
                    - groups
                sort:
                  title: Sort
                  description: Sort criteria for the segment.
                  type: array
                  items:
                    type: object
                    properties:
                      columnSlug:
                        type: string
                      kind:
                        type: string
                        enum:
                          - asc
                          - desc
                    required:
                      - columnSlug
                      - kind
                limit:
                  title: Limit
                  description: Maximum number of records in the segment.
                  type: number
                trackingColumnSlugs:
                  title: Tracking column slugs
                  description: Tracking column identifiers.
                  type: array
                  items:
                    type: string
                columnSlugs:
                  title: Column slugs
                  description: Identifiers of the columns displayed for the segment.
                  type: array
                  items:
                    type: string
              required:
                - name
                - modelUuid
                - filter
              additionalProperties: false
              title: Request body
              description: Request body schema.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  segment:
                    type: object
                    properties:
                      uuid:
                        type: string
                      workspaceUuid:
                        type: string
                      userUuid:
                        type: string
                      modelUuid:
                        type: string
                      slug:
                        type: string
                      name:
                        type: string
                      filter:
                        type: object
                        properties:
                          conjonction:
                            type: string
                            enum:
                              - or
                              - and
                          groups:
                            type: array
                            items:
                              type: object
                              properties:
                                conjonction:
                                  type: string
                                  enum:
                                    - or
                                    - and
                                conditions:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            const: sql
                                          name:
                                            type: string
                                          clause:
                                            type: string
                                        required:
                                          - kind
                                          - name
                                          - clause
                                        additionalProperties: false
                                      - allOf:
                                          - type: object
                                            properties:
                                              kind:
                                                type: string
                                                const: string
                                              relatedModelUuid:
                                                type: string
                                              columnSlug:
                                                type: string
                                            required:
                                              - kind
                                              - columnSlug
                                            additionalProperties: false
                                          - anyOf:
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - is
                                                      - isNot
                                                      - contains
                                                      - doesNotContain
                                                      - startsWith
                                                      - endsWith
                                                  values:
                                                    anyOf:
                                                      - type: string
                                                      - type: array
                                                        items:
                                                          type: string
                                                required:
                                                  - operator
                                                  - values
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - isNull
                                                      - isNotNull
                                                      - isEmpty
                                                      - isNotEmpty
                                                required:
                                                  - operator
                                                additionalProperties: false
                                      - allOf:
                                          - type: object
                                            properties:
                                              kind:
                                                type: string
                                                const: number
                                              relatedModelUuid:
                                                type: string
                                              columnSlug:
                                                type: string
                                            required:
                                              - kind
                                              - columnSlug
                                            additionalProperties: false
                                          - anyOf:
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - is
                                                      - isNot
                                                      - greaterThan
                                                      - lowerThan
                                                  value:
                                                    type: number
                                                required:
                                                  - operator
                                                  - value
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    const: between
                                                  firstValue:
                                                    type: number
                                                  lastValue:
                                                    type: number
                                                required:
                                                  - operator
                                                  - firstValue
                                                  - lastValue
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - isNull
                                                      - isNotNull
                                                required:
                                                  - operator
                                                additionalProperties: false
                                      - allOf:
                                          - type: object
                                            properties:
                                              kind:
                                                type: string
                                                const: objectProperty
                                              relatedModelUuid:
                                                type: string
                                              columnSlug:
                                                type: string
                                              propertyName:
                                                type: string
                                            required:
                                              - kind
                                              - columnSlug
                                              - propertyName
                                            additionalProperties: false
                                          - anyOf:
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - is
                                                      - isNot
                                                      - contains
                                                      - greaterThan
                                                      - lowerThan
                                                      - doesNotContain
                                                      - startsWith
                                                      - endsWith
                                                  value:
                                                    type: string
                                                required:
                                                  - operator
                                                  - value
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - isNull
                                                      - isNotNull
                                                      - isEmpty
                                                      - isNotEmpty
                                                required:
                                                  - operator
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    const: between
                                                  value:
                                                    type: string
                                                  otherValue:
                                                    type: string
                                                required:
                                                  - operator
                                                  - value
                                                  - otherValue
                                                additionalProperties: false
                                      - allOf:
                                          - type: object
                                            properties:
                                              kind:
                                                type: string
                                                const: object
                                              relatedModelUuid:
                                                type: string
                                              columnSlug:
                                                type: string
                                            required:
                                              - kind
                                              - columnSlug
                                            additionalProperties: false
                                          - anyOf:
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    const: isNull
                                                required:
                                                  - operator
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    const: isNotNull
                                                required:
                                                  - operator
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    const: matchConditions
                                                  conjonction:
                                                    type: string
                                                    enum:
                                                      - or
                                                      - and
                                                  propertyConditions:
                                                    type: array
                                                    items:
                                                      allOf:
                                                        - type: object
                                                          properties:
                                                            kind:
                                                              type: string
                                                              const: objectProperty
                                                            relatedModelUuid:
                                                              type: string
                                                            columnSlug:
                                                              type: string
                                                            propertyName:
                                                              type: string
                                                          required:
                                                            - kind
                                                            - columnSlug
                                                            - propertyName
                                                          additionalProperties: false
                                                        - anyOf:
                                                            - type: object
                                                              properties:
                                                                operator:
                                                                  type: string
                                                                  enum:
                                                                    - is
                                                                    - isNot
                                                                    - contains
                                                                    - greaterThan
                                                                    - lowerThan
                                                                    - doesNotContain
                                                                    - startsWith
                                                                    - endsWith
                                                                value:
                                                                  type: string
                                                              required:
                                                                - operator
                                                                - value
                                                              additionalProperties: false
                                                            - type: object
                                                              properties:
                                                                operator:
                                                                  type: string
                                                                  enum:
                                                                    - isNull
                                                                    - isNotNull
                                                                    - isEmpty
                                                                    - isNotEmpty
                                                              required:
                                                                - operator
                                                              additionalProperties: false
                                                            - type: object
                                                              properties:
                                                                operator:
                                                                  type: string
                                                                  const: between
                                                                value:
                                                                  type: string
                                                                otherValue:
                                                                  type: string
                                                              required:
                                                                - operator
                                                                - value
                                                                - otherValue
                                                              additionalProperties: false
                                                required:
                                                  - operator
                                                  - conjonction
                                                  - propertyConditions
                                                additionalProperties: false
                                      - allOf:
                                          - type: object
                                            properties:
                                              kind:
                                                type: string
                                                const: array
                                              relatedModelUuid:
                                                type: string
                                              columnSlug:
                                                type: string
                                            required:
                                              - kind
                                              - columnSlug
                                            additionalProperties: false
                                          - anyOf:
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    const: isNull
                                                required:
                                                  - operator
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    const: isNotNull
                                                required:
                                                  - operator
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    const: matchConditions
                                                  conjonction:
                                                    type: string
                                                    enum:
                                                      - or
                                                      - and
                                                  propertyConditions:
                                                    type: array
                                                    items:
                                                      allOf:
                                                        - type: object
                                                          properties:
                                                            kind:
                                                              type: string
                                                              const: objectProperty
                                                            relatedModelUuid:
                                                              type: string
                                                            columnSlug:
                                                              type: string
                                                            propertyName:
                                                              type: string
                                                          required:
                                                            - kind
                                                            - columnSlug
                                                            - propertyName
                                                          additionalProperties: false
                                                        - anyOf:
                                                            - type: object
                                                              properties:
                                                                operator:
                                                                  type: string
                                                                  enum:
                                                                    - is
                                                                    - isNot
                                                                    - contains
                                                                    - greaterThan
                                                                    - lowerThan
                                                                    - doesNotContain
                                                                    - startsWith
                                                                    - endsWith
                                                                value:
                                                                  type: string
                                                              required:
                                                                - operator
                                                                - value
                                                              additionalProperties: false
                                                            - type: object
                                                              properties:
                                                                operator:
                                                                  type: string
                                                                  enum:
                                                                    - isNull
                                                                    - isNotNull
                                                                    - isEmpty
                                                                    - isNotEmpty
                                                              required:
                                                                - operator
                                                              additionalProperties: false
                                                            - type: object
                                                              properties:
                                                                operator:
                                                                  type: string
                                                                  const: between
                                                                value:
                                                                  type: string
                                                                otherValue:
                                                                  type: string
                                                              required:
                                                                - operator
                                                                - value
                                                                - otherValue
                                                              additionalProperties: false
                                                required:
                                                  - operator
                                                  - conjonction
                                                  - propertyConditions
                                                additionalProperties: false
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            const: any
                                          relatedModelUuid:
                                            type: string
                                          columnSlug:
                                            type: string
                                          operator:
                                            type: string
                                            enum:
                                              - isNull
                                              - isNotNull
                                        required:
                                          - kind
                                          - columnSlug
                                          - operator
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            const: vector
                                          relatedModelUuid:
                                            type: string
                                          columnSlug:
                                            type: string
                                          operator:
                                            type: string
                                            enum:
                                              - isNull
                                              - isNotNull
                                        required:
                                          - kind
                                          - columnSlug
                                          - operator
                                        additionalProperties: false
                                      - allOf:
                                          - type: object
                                            properties:
                                              kind:
                                                type: string
                                                const: date
                                              relatedModelUuid:
                                                type: string
                                              columnSlug:
                                                type: string
                                            required:
                                              - kind
                                              - columnSlug
                                            additionalProperties: false
                                          - anyOf:
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - is
                                                      - isNot
                                                      - greaterThan
                                                      - lowerThan
                                                  value:
                                                    type: string
                                                required:
                                                  - operator
                                                  - value
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    const: between
                                                  firstValue:
                                                    type: string
                                                  lastValue:
                                                    type: string
                                                required:
                                                  - operator
                                                  - firstValue
                                                  - lastValue
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - isNull
                                                      - isNotNull
                                                required:
                                                  - operator
                                                additionalProperties: false
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            const: boolean
                                          relatedModelUuid:
                                            type: string
                                          columnSlug:
                                            type: string
                                          operator:
                                            type: string
                                            enum:
                                              - isTrue
                                              - isFalse
                                              - isNull
                                              - isNotNull
                                        required:
                                          - kind
                                          - columnSlug
                                          - operator
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            const: occurrence
                                          relatedModelUuid:
                                            type: string
                                          frequency:
                                            anyOf:
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    const: not
                                                required:
                                                  - operator
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - moreThan
                                                      - lessThan
                                                      - exactly
                                                  value:
                                                    type: number
                                                required:
                                                  - operator
                                                  - value
                                                additionalProperties: false
                                          period:
                                            type: object
                                            properties:
                                              operator:
                                                type: string
                                                enum:
                                                  - lessThan
                                                  - moreThan
                                                  - exactly
                                              value:
                                                type: number
                                              unit:
                                                type: string
                                                const: day
                                            required:
                                              - operator
                                              - value
                                              - unit
                                            additionalProperties: false
                                          conjonction:
                                            type: string
                                            enum:
                                              - or
                                              - and
                                          conditions:
                                            type: array
                                            items:
                                              anyOf:
                                                - allOf:
                                                    - type: object
                                                      properties:
                                                        kind:
                                                          type: string
                                                          const: string
                                                        relatedModelUuid:
                                                          type: string
                                                        columnSlug:
                                                          type: string
                                                      required:
                                                        - kind
                                                        - columnSlug
                                                      additionalProperties: false
                                                    - anyOf:
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              enum:
                                                                - is
                                                                - isNot
                                                                - contains
                                                                - doesNotContain
                                                                - startsWith
                                                                - endsWith
                                                            values:
                                                              anyOf:
                                                                - type: string
                                                                - type: array
                                                                  items:
                                                                    type: string
                                                          required:
                                                            - operator
                                                            - values
                                                          additionalProperties: false
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              enum:
                                                                - isNull
                                                                - isNotNull
                                                                - isEmpty
                                                                - isNotEmpty
                                                          required:
                                                            - operator
                                                          additionalProperties: false
                                                - allOf:
                                                    - type: object
                                                      properties:
                                                        kind:
                                                          type: string
                                                          const: number
                                                        relatedModelUuid:
                                                          type: string
                                                        columnSlug:
                                                          type: string
                                                      required:
                                                        - kind
                                                        - columnSlug
                                                      additionalProperties: false
                                                    - anyOf:
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              enum:
                                                                - is
                                                                - isNot
                                                                - greaterThan
                                                                - lowerThan
                                                            value:
                                                              type: number
                                                          required:
                                                            - operator
                                                            - value
                                                          additionalProperties: false
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              const: between
                                                            firstValue:
                                                              type: number
                                                            lastValue:
                                                              type: number
                                                          required:
                                                            - operator
                                                            - firstValue
                                                            - lastValue
                                                          additionalProperties: false
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              enum:
                                                                - isNull
                                                                - isNotNull
                                                          required:
                                                            - operator
                                                          additionalProperties: false
                                                - allOf:
                                                    - type: object
                                                      properties:
                                                        kind:
                                                          type: string
                                                          const: object
                                                        relatedModelUuid:
                                                          type: string
                                                        columnSlug:
                                                          type: string
                                                      required:
                                                        - kind
                                                        - columnSlug
                                                      additionalProperties: false
                                                    - anyOf:
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              const: isNull
                                                          required:
                                                            - operator
                                                          additionalProperties: false
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              const: isNotNull
                                                          required:
                                                            - operator
                                                          additionalProperties: false
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              const: matchConditions
                                                            conjonction:
                                                              type: string
                                                              enum:
                                                                - or
                                                                - and
                                                            propertyConditions:
                                                              type: array
                                                              items:
                                                                allOf:
                                                                  - type: object
                                                                    properties:
                                                                      kind: {}
                                                                      relatedModelUuid: {}
                                                                      columnSlug: {}
                                                                      propertyName: {}
                                                                    required:
                                                                      - kind
                                                                      - columnSlug
                                                                      - propertyName
                                                                    additionalProperties: false
                                                                  - anyOf:
                                                                      - {}
                                                                      - {}
                                                                      - {}
                                                          required:
                                                            - operator
                                                            - conjonction
                                                            - propertyConditions
                                                          additionalProperties: false
                                                - allOf:
                                                    - type: object
                                                      properties:
                                                        kind:
                                                          type: string
                                                          const: array
                                                        relatedModelUuid:
                                                          type: string
                                                        columnSlug:
                                                          type: string
                                                      required:
                                                        - kind
                                                        - columnSlug
                                                      additionalProperties: false
                                                    - anyOf:
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              const: isNull
                                                          required:
                                                            - operator
                                                          additionalProperties: false
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              const: isNotNull
                                                          required:
                                                            - operator
                                                          additionalProperties: false
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              const: matchConditions
                                                            conjonction:
                                                              type: string
                                                              enum:
                                                                - or
                                                                - and
                                                            propertyConditions:
                                                              type: array
                                                              items:
                                                                allOf:
                                                                  - type: object
                                                                    properties:
                                                                      kind: {}
                                                                      relatedModelUuid: {}
                                                                      columnSlug: {}
                                                                      propertyName: {}
                                                                    required:
                                                                      - kind
                                                                      - columnSlug
                                                                      - propertyName
                                                                    additionalProperties: false
                                                                  - anyOf:
                                                                      - {}
                                                                      - {}
                                                                      - {}
                                                          required:
                                                            - operator
                                                            - conjonction
                                                            - propertyConditions
                                                          additionalProperties: false
                                                - type: object
                                                  properties:
                                                    kind:
                                                      type: string
                                                      const: any
                                                    relatedModelUuid:
                                                      type: string
                                                    columnSlug:
                                                      type: string
                                                    operator:
                                                      type: string
                                                      enum:
                                                        - isNull
                                                        - isNotNull
                                                  required:
                                                    - kind
                                                    - columnSlug
                                                    - operator
                                                  additionalProperties: false
                                                - type: object
                                                  properties:
                                                    kind:
                                                      type: string
                                                      const: vector
                                                    relatedModelUuid:
                                                      type: string
                                                    columnSlug:
                                                      type: string
                                                    operator:
                                                      type: string
                                                      enum:
                                                        - isNull
                                                        - isNotNull
                                                  required:
                                                    - kind
                                                    - columnSlug
                                                    - operator
                                                  additionalProperties: false
                                                - allOf:
                                                    - type: object
                                                      properties:
                                                        kind:
                                                          type: string
                                                          const: date
                                                        relatedModelUuid:
                                                          type: string
                                                        columnSlug:
                                                          type: string
                                                      required:
                                                        - kind
                                                        - columnSlug
                                                      additionalProperties: false
                                                    - anyOf:
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              enum:
                                                                - is
                                                                - isNot
                                                                - greaterThan
                                                                - lowerThan
                                                            value:
                                                              type: string
                                                          required:
                                                            - operator
                                                            - value
                                                          additionalProperties: false
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              const: between
                                                            firstValue:
                                                              type: string
                                                            lastValue:
                                                              type: string
                                                          required:
                                                            - operator
                                                            - firstValue
                                                            - lastValue
                                                          additionalProperties: false
                                                        - type: object
                                                          properties:
                                                            operator:
                                                              type: string
                                                              enum:
                                                                - isNull
                                                                - isNotNull
                                                          required:
                                                            - operator
                                                          additionalProperties: false
                                                - type: object
                                                  properties:
                                                    kind:
                                                      type: string
                                                      const: boolean
                                                    relatedModelUuid:
                                                      type: string
                                                    columnSlug:
                                                      type: string
                                                    operator:
                                                      type: string
                                                      enum:
                                                        - isTrue
                                                        - isFalse
                                                        - isNull
                                                        - isNotNull
                                                  required:
                                                    - kind
                                                    - columnSlug
                                                    - operator
                                                  additionalProperties: false
                                        required:
                                          - kind
                                          - relatedModelUuid
                                          - frequency
                                          - period
                                          - conjonction
                                          - conditions
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            const: enrollment
                                          workflowUuid:
                                            type: string
                                          activityKind:
                                            type: string
                                            enum:
                                              - workflowEntered
                                              - workflowNodeExecuted
                                              - workflowLeft
                                          nodeSlug:
                                            type: string
                                          frequency:
                                            anyOf:
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    const: not
                                                required:
                                                  - operator
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  operator:
                                                    type: string
                                                    enum:
                                                      - moreThan
                                                      - lessThan
                                                      - exactly
                                                  value:
                                                    type: number
                                                required:
                                                  - operator
                                                  - value
                                                additionalProperties: false
                                          period:
                                            type: object
                                            properties:
                                              operator:
                                                type: string
                                                enum:
                                                  - lessThan
                                                  - moreThan
                                                  - exactly
                                              value:
                                                type: number
                                              unit:
                                                type: string
                                                const: day
                                            required:
                                              - operator
                                              - value
                                              - unit
                                            additionalProperties: false
                                        required:
                                          - kind
                                          - workflowUuid
                                          - activityKind
                                          - frequency
                                          - period
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            const: segment
                                          segmentUuid:
                                            type: string
                                          operator:
                                            type: string
                                            enum:
                                              - in
                                              - notIn
                                        required:
                                          - kind
                                          - segmentUuid
                                          - operator
                                        additionalProperties: false
                              required:
                                - conjonction
                                - conditions
                              additionalProperties: false
                        required:
                          - conjonction
                          - groups
                        additionalProperties: false
                      sort:
                        anyOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                columnSlug:
                                  type: string
                                kind:
                                  type: string
                                  enum:
                                    - asc
                                    - desc
                              required:
                                - columnSlug
                                - kind
                              additionalProperties: false
                          - type: 'null'
                      limit:
                        anyOf:
                          - type: number
                          - type: 'null'
                      recordsCount:
                        type: number
                      fromPlay:
                        type: boolean
                      trackingColumnSlugs:
                        anyOf:
                          - type: array
                            items:
                              type: string
                          - type: 'null'
                      columnSlugs:
                        anyOf:
                          - type: array
                            items:
                              type: string
                          - type: 'null'
                      syncedAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                      deletedAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                      lastChange:
                        anyOf:
                          - type: object
                            properties:
                              uuid:
                                type: string
                              slug:
                                type: string
                              totalRecordsCount:
                                type: number
                              updatedRecordsCount:
                                type: number
                              removedRecordsCount:
                                type: number
                              addedRecordsCount:
                                type: number
                              unchangedRecordsCount:
                                type: number
                              createdAt:
                                type: string
                            required:
                              - uuid
                              - slug
                              - totalRecordsCount
                              - updatedRecordsCount
                              - removedRecordsCount
                              - addedRecordsCount
                              - unchangedRecordsCount
                              - createdAt
                            additionalProperties: false
                          - type: 'null'
                    required:
                      - uuid
                      - workspaceUuid
                      - userUuid
                      - modelUuid
                      - slug
                      - name
                      - filter
                      - sort
                      - limit
                      - recordsCount
                      - fromPlay
                      - trackingColumnSlugs
                      - columnSlugs
                      - syncedAt
                      - createdAt
                      - updatedAt
                      - deletedAt
                      - lastChange
                    additionalProperties: false
                    title: Segment
                    description: Created segment details.
                required:
                  - segment
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````