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

# Update Segment

> Partial-update a segment. No-op updates return 200 without
emitting ``SegmentUpdated``. Supplying ``conditions`` triggers a
recompile and clears ``validation_error`` if the tree compiles
cleanly (design §8.1).



## OpenAPI

````yaml /openapi/mio-openapi.json patch /api/v1/teams/{team_id}/segments/{segment_id}
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/segments/{segment_id}:
    patch:
      tags:
        - segments-admin
      summary: Update Segment
      description: |-
        Partial-update a segment. No-op updates return 200 without
        emitting ``SegmentUpdated``. Supplying ``conditions`` triggers a
        recompile and clears ``validation_error`` if the tree compiles
        cleanly (design §8.1).
      operationId: >-
        segments_admin.patch_segments_admin_patch_teams_by_team_id_segments_by_segment_id
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: segment_id
          required: true
          schema:
            title: Segment Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/SegmentUpdateEnvelope'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SegmentResponse'
          description: Successful Response
        '400':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Validation error
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Not authenticated
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Forbidden
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Resource not found
        '409':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Conflict (slug collision or referenced entities exist)
        '415':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Unsupported media type (requires application/vnd.api+json)
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Unprocessable entity (compile-time reference failures)
      security:
        - HTTPBearer: []
components:
  schemas:
    SegmentUpdateEnvelope:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/SegmentUpdateResource'
      required:
        - data
      title: SegmentUpdateEnvelope
      type: object
    SegmentResponse:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/SegmentResource'
      required:
        - data
      title: SegmentResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    SegmentUpdateResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/SegmentUpdateAttributes'
        type:
          const: segment
          title: Type
          type: string
      required:
        - type
        - attributes
      title: SegmentUpdateResource
      type: object
    SegmentResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/SegmentAttributes'
        id:
          title: Id
          type: string
        type:
          const: segment
          default: segment
          title: Type
          type: string
      required:
        - id
        - attributes
      title: SegmentResource
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
    SegmentUpdateAttributes:
      additionalProperties: false
      properties:
        conditions:
          anyOf:
            - $ref: '#/components/schemas/ConditionTreeIn'
            - type: 'null'
        description:
          anyOf:
            - maxLength: 2000
              type: string
            - type: 'null'
          title: Description
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        name:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          title: Name
        slug:
          anyOf:
            - maxLength: 255
              minLength: 1
              pattern: ^[a-z0-9][a-z0-9\-_]*$
              type: string
            - type: 'null'
          title: Slug
      title: SegmentUpdateAttributes
      type: object
    SegmentAttributes:
      additionalProperties: false
      properties:
        conditions:
          $ref: '#/components/schemas/CompiledConditionTree'
        created_at:
          format: date-time
          title: Created At
          type: string
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        deleted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Deleted At
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        is_active:
          title: Is Active
          type: boolean
        name:
          title: Name
          type: string
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
        team_id:
          title: Team Id
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
        validation_error:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Validation Error
      required:
        - team_id
        - name
        - slug
        - description
        - conditions
        - is_active
        - validation_error
        - created_by
        - created_at
        - updated_at
        - deleted_at
      title: SegmentAttributes
      type: object
    ConditionTreeIn:
      additionalProperties: false
      description: Admin write shape. Slugs not yet resolved.
      properties:
        groups:
          items:
            $ref: '#/components/schemas/GroupIn'
          maxItems: 50
          minItems: 1
          title: Groups
          type: array
        version:
          const: 1
          title: Version
          type: integer
      required:
        - version
        - groups
      title: ConditionTreeIn
      type: object
    CompiledConditionTree:
      additionalProperties: false
      description: Persisted shape. Slugs resolved to FK IDs.
      properties:
        groups:
          items:
            $ref: '#/components/schemas/GroupCompiled'
          maxItems: 50
          minItems: 1
          title: Groups
          type: array
        version:
          const: 1
          title: Version
          type: integer
      required:
        - version
        - groups
      title: CompiledConditionTree
      type: object
    GroupIn:
      additionalProperties: false
      properties:
        conditions:
          items:
            discriminator:
              mapping:
                attribute_boolean:
                  $ref: '#/components/schemas/AttributeBooleanConditionIn'
                attribute_date:
                  $ref: '#/components/schemas/AttributeDateConditionIn'
                attribute_multiple:
                  $ref: '#/components/schemas/AttributeMultipleConditionIn'
                attribute_number:
                  $ref: '#/components/schemas/AttributeNumberConditionIn'
                attribute_single:
                  $ref: '#/components/schemas/AttributeSingleConditionIn'
                attribute_text:
                  $ref: '#/components/schemas/AttributeTextConditionIn'
                belongs_to_hub:
                  $ref: '#/components/schemas/BelongsToHubConditionIn'
                billing_status:
                  $ref: '#/components/schemas/BillingStatusConditionIn'
                city:
                  $ref: '#/components/schemas/CityConditionIn'
                country:
                  $ref: '#/components/schemas/CountryConditionIn'
                date_registered:
                  $ref: '#/components/schemas/DateRegisteredConditionIn'
                email:
                  $ref: '#/components/schemas/EmailConditionIn'
                first_name:
                  $ref: '#/components/schemas/FirstNameConditionIn'
                has_plan:
                  $ref: '#/components/schemas/HasPlanConditionIn'
                has_product:
                  $ref: '#/components/schemas/HasProductConditionIn'
                has_tag:
                  $ref: '#/components/schemas/HasTagConditionIn'
                hub_audience_registration:
                  $ref: '#/components/schemas/HubAudienceRegistrationConditionIn'
                hub_file_activity:
                  $ref: '#/components/schemas/HubFileActivityConditionIn'
                hub_number_of_searches:
                  $ref: '#/components/schemas/HubNumberOfSearchesConditionIn'
                hub_playlist_activity:
                  $ref: '#/components/schemas/HubPlaylistActivityConditionIn'
                hub_time_since_joining:
                  $ref: '#/components/schemas/HubTimeSinceJoiningConditionIn'
                hub_unique_logins:
                  $ref: '#/components/schemas/HubUniqueLoginsConditionIn'
                last_name:
                  $ref: '#/components/schemas/LastNameConditionIn'
                state:
                  $ref: '#/components/schemas/StateConditionIn'
              propertyName: type
            oneOf:
              - $ref: '#/components/schemas/EmailConditionIn'
              - $ref: '#/components/schemas/FirstNameConditionIn'
              - $ref: '#/components/schemas/LastNameConditionIn'
              - $ref: '#/components/schemas/CityConditionIn'
              - $ref: '#/components/schemas/StateConditionIn'
              - $ref: '#/components/schemas/CountryConditionIn'
              - $ref: '#/components/schemas/DateRegisteredConditionIn'
              - $ref: '#/components/schemas/BillingStatusConditionIn'
              - $ref: '#/components/schemas/HasProductConditionIn'
              - $ref: '#/components/schemas/HasPlanConditionIn'
              - $ref: '#/components/schemas/BelongsToHubConditionIn'
              - $ref: '#/components/schemas/HasTagConditionIn'
              - $ref: '#/components/schemas/HubFileActivityConditionIn'
              - $ref: '#/components/schemas/HubPlaylistActivityConditionIn'
              - $ref: '#/components/schemas/HubUniqueLoginsConditionIn'
              - $ref: '#/components/schemas/HubNumberOfSearchesConditionIn'
              - $ref: '#/components/schemas/HubTimeSinceJoiningConditionIn'
              - $ref: '#/components/schemas/HubAudienceRegistrationConditionIn'
              - $ref: '#/components/schemas/AttributeTextConditionIn'
              - $ref: '#/components/schemas/AttributeNumberConditionIn'
              - $ref: '#/components/schemas/AttributeBooleanConditionIn'
              - $ref: '#/components/schemas/AttributeDateConditionIn'
              - $ref: '#/components/schemas/AttributeMultipleConditionIn'
              - $ref: '#/components/schemas/AttributeSingleConditionIn'
          maxItems: 50
          minItems: 1
          title: Conditions
          type: array
        logic:
          const: AND
          title: Logic
          type: string
      required:
        - logic
        - conditions
      title: GroupIn
      type: object
    GroupCompiled:
      additionalProperties: false
      properties:
        conditions:
          items:
            discriminator:
              mapping:
                attribute_boolean:
                  $ref: '#/components/schemas/AttributeBooleanConditionCompiled'
                attribute_date:
                  $ref: '#/components/schemas/AttributeDateConditionCompiled'
                attribute_multiple:
                  $ref: '#/components/schemas/AttributeMultipleConditionCompiled'
                attribute_number:
                  $ref: '#/components/schemas/AttributeNumberConditionCompiled'
                attribute_single:
                  $ref: '#/components/schemas/AttributeSingleConditionCompiled'
                attribute_text:
                  $ref: '#/components/schemas/AttributeTextConditionCompiled'
                belongs_to_hub:
                  $ref: '#/components/schemas/BelongsToHubConditionCompiled'
                billing_status:
                  $ref: '#/components/schemas/BillingStatusConditionCompiled'
                city:
                  $ref: '#/components/schemas/CityConditionCompiled'
                country:
                  $ref: '#/components/schemas/CountryConditionCompiled'
                date_registered:
                  $ref: '#/components/schemas/DateRegisteredConditionCompiled'
                email:
                  $ref: '#/components/schemas/EmailConditionCompiled'
                first_name:
                  $ref: '#/components/schemas/FirstNameConditionCompiled'
                has_plan:
                  $ref: '#/components/schemas/HasPlanConditionCompiled'
                has_product:
                  $ref: '#/components/schemas/HasProductConditionCompiled'
                has_tag:
                  $ref: '#/components/schemas/HasTagConditionCompiled'
                hub_audience_registration:
                  $ref: >-
                    #/components/schemas/HubAudienceRegistrationConditionCompiled
                hub_file_activity:
                  $ref: '#/components/schemas/HubFileActivityConditionCompiled'
                hub_number_of_searches:
                  $ref: '#/components/schemas/HubNumberOfSearchesConditionCompiled'
                hub_playlist_activity:
                  $ref: '#/components/schemas/HubPlaylistActivityConditionCompiled'
                hub_time_since_joining:
                  $ref: '#/components/schemas/HubTimeSinceJoiningConditionCompiled'
                hub_unique_logins:
                  $ref: '#/components/schemas/HubUniqueLoginsConditionCompiled'
                last_name:
                  $ref: '#/components/schemas/LastNameConditionCompiled'
                state:
                  $ref: '#/components/schemas/StateConditionCompiled'
              propertyName: type
            oneOf:
              - $ref: '#/components/schemas/EmailConditionCompiled'
              - $ref: '#/components/schemas/FirstNameConditionCompiled'
              - $ref: '#/components/schemas/LastNameConditionCompiled'
              - $ref: '#/components/schemas/CityConditionCompiled'
              - $ref: '#/components/schemas/StateConditionCompiled'
              - $ref: '#/components/schemas/CountryConditionCompiled'
              - $ref: '#/components/schemas/DateRegisteredConditionCompiled'
              - $ref: '#/components/schemas/BillingStatusConditionCompiled'
              - $ref: '#/components/schemas/HasProductConditionCompiled'
              - $ref: '#/components/schemas/HasPlanConditionCompiled'
              - $ref: '#/components/schemas/BelongsToHubConditionCompiled'
              - $ref: '#/components/schemas/HasTagConditionCompiled'
              - $ref: '#/components/schemas/HubFileActivityConditionCompiled'
              - $ref: '#/components/schemas/HubPlaylistActivityConditionCompiled'
              - $ref: '#/components/schemas/HubUniqueLoginsConditionCompiled'
              - $ref: '#/components/schemas/HubNumberOfSearchesConditionCompiled'
              - $ref: '#/components/schemas/HubTimeSinceJoiningConditionCompiled'
              - $ref: '#/components/schemas/HubAudienceRegistrationConditionCompiled'
              - $ref: '#/components/schemas/AttributeTextConditionCompiled'
              - $ref: '#/components/schemas/AttributeNumberConditionCompiled'
              - $ref: '#/components/schemas/AttributeBooleanConditionCompiled'
              - $ref: '#/components/schemas/AttributeDateConditionCompiled'
              - $ref: '#/components/schemas/AttributeMultipleConditionCompiled'
              - $ref: '#/components/schemas/AttributeSingleConditionCompiled'
          maxItems: 50
          minItems: 1
          title: Conditions
          type: array
        logic:
          const: AND
          title: Logic
          type: string
      required:
        - logic
        - conditions
      title: GroupCompiled
      type: object
    AttributeBooleanConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: attribute_boolean
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeBooleanValueIn'
      required:
        - type
        - operator
        - value
      title: AttributeBooleanConditionIn
      type: object
    AttributeDateConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: attribute_date
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeDateValueIn'
      required:
        - type
        - operator
        - value
      title: AttributeDateConditionIn
      type: object
    AttributeMultipleConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: attribute_multiple
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeMultipleValueIn'
      required:
        - type
        - operator
        - value
      title: AttributeMultipleConditionIn
      type: object
    AttributeNumberConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: attribute_number
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeNumberValueIn'
      required:
        - type
        - operator
        - value
      title: AttributeNumberConditionIn
      type: object
    AttributeSingleConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: attribute_single
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeSingleValueIn'
      required:
        - type
        - operator
        - value
      title: AttributeSingleConditionIn
      type: object
    AttributeTextConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: attribute_text
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeTextValueIn'
      required:
        - type
        - operator
        - value
      title: AttributeTextConditionIn
      type: object
    BelongsToHubConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: belongs_to_hub
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/BelongsToHubValue'
      required:
        - type
        - operator
        - value
      title: BelongsToHubConditionIn
      type: object
    BillingStatusConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: billing_status
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/BillingStatusValue'
      required:
        - type
        - operator
        - value
      title: BillingStatusConditionIn
      type: object
    CityConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: city
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/CityValue'
      required:
        - type
        - operator
        - value
      title: CityConditionIn
      type: object
    CountryConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: country
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/CountryValue'
      required:
        - type
        - operator
        - value
      title: CountryConditionIn
      type: object
    DateRegisteredConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: date_registered
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/DateRegisteredValue'
      required:
        - type
        - operator
        - value
      title: DateRegisteredConditionIn
      type: object
    EmailConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: email
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/EmailValue'
      required:
        - type
        - operator
        - value
      title: EmailConditionIn
      type: object
    FirstNameConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: first_name
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/FirstNameValue'
      required:
        - type
        - operator
        - value
      title: FirstNameConditionIn
      type: object
    HasPlanConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: has_plan
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HasPlanValue'
      required:
        - type
        - operator
        - value
      title: HasPlanConditionIn
      type: object
    HasProductConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: has_product
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HasProductValue'
      required:
        - type
        - operator
        - value
      title: HasProductConditionIn
      type: object
    HasTagConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: has_tag
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HasTagValueIn'
      required:
        - type
        - operator
        - value
      title: HasTagConditionIn
      type: object
    HubAudienceRegistrationConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: hub_audience_registration
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubAudienceRegistrationValue'
      required:
        - type
        - operator
        - value
      title: HubAudienceRegistrationConditionIn
      type: object
    HubFileActivityConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: hub_file_activity
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubFileActivityValue'
      required:
        - type
        - operator
        - value
      title: HubFileActivityConditionIn
      type: object
    HubNumberOfSearchesConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: hub_number_of_searches
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubNumberOfSearchesValue'
      required:
        - type
        - operator
        - value
      title: HubNumberOfSearchesConditionIn
      type: object
    HubPlaylistActivityConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: hub_playlist_activity
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubPlaylistActivityValue'
      required:
        - type
        - operator
        - value
      title: HubPlaylistActivityConditionIn
      type: object
    HubTimeSinceJoiningConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: hub_time_since_joining
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubTimeSinceJoiningValue'
      required:
        - type
        - operator
        - value
      title: HubTimeSinceJoiningConditionIn
      type: object
    HubUniqueLoginsConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: hub_unique_logins
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubUniqueLoginsValue'
      required:
        - type
        - operator
        - value
      title: HubUniqueLoginsConditionIn
      type: object
    LastNameConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: last_name
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/LastNameValue'
      required:
        - type
        - operator
        - value
      title: LastNameConditionIn
      type: object
    StateConditionIn:
      additionalProperties: false
      properties:
        operator:
          title: Operator
          type: string
        type:
          const: state
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/StateValue'
      required:
        - type
        - operator
        - value
      title: StateConditionIn
      type: object
    AttributeBooleanConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: attribute_boolean
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeBooleanValueCompiled'
      required:
        - type
        - operator
        - value
      title: AttributeBooleanConditionCompiled
      type: object
    AttributeDateConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: attribute_date
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeDateValueCompiled'
      required:
        - type
        - operator
        - value
      title: AttributeDateConditionCompiled
      type: object
    AttributeMultipleConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: attribute_multiple
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeMultipleValueCompiled'
      required:
        - type
        - operator
        - value
      title: AttributeMultipleConditionCompiled
      type: object
    AttributeNumberConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: attribute_number
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeNumberValueCompiled'
      required:
        - type
        - operator
        - value
      title: AttributeNumberConditionCompiled
      type: object
    AttributeSingleConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: attribute_single
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeSingleValueCompiled'
      required:
        - type
        - operator
        - value
      title: AttributeSingleConditionCompiled
      type: object
    AttributeTextConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: attribute_text
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/AttributeTextValueCompiled'
      required:
        - type
        - operator
        - value
      title: AttributeTextConditionCompiled
      type: object
    BelongsToHubConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: belongs_to_hub
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/BelongsToHubValue'
      required:
        - type
        - operator
        - value
      title: BelongsToHubConditionCompiled
      type: object
    BillingStatusConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: billing_status
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/BillingStatusValue'
      required:
        - type
        - operator
        - value
      title: BillingStatusConditionCompiled
      type: object
    CityConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: city
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/CityValue'
      required:
        - type
        - operator
        - value
      title: CityConditionCompiled
      type: object
    CountryConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: country
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/CountryValue'
      required:
        - type
        - operator
        - value
      title: CountryConditionCompiled
      type: object
    DateRegisteredConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: date_registered
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/DateRegisteredValue'
      required:
        - type
        - operator
        - value
      title: DateRegisteredConditionCompiled
      type: object
    EmailConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: email
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/EmailValue'
      required:
        - type
        - operator
        - value
      title: EmailConditionCompiled
      type: object
    FirstNameConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: first_name
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/FirstNameValue'
      required:
        - type
        - operator
        - value
      title: FirstNameConditionCompiled
      type: object
    HasPlanConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: has_plan
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HasPlanValue'
      required:
        - type
        - operator
        - value
      title: HasPlanConditionCompiled
      type: object
    HasProductConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: has_product
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HasProductValue'
      required:
        - type
        - operator
        - value
      title: HasProductConditionCompiled
      type: object
    HasTagConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: has_tag
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HasTagValueCompiled'
      required:
        - type
        - operator
        - value
      title: HasTagConditionCompiled
      type: object
    HubAudienceRegistrationConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: hub_audience_registration
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubAudienceRegistrationValue'
      required:
        - type
        - operator
        - value
      title: HubAudienceRegistrationConditionCompiled
      type: object
    HubFileActivityConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: hub_file_activity
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubFileActivityValue'
      required:
        - type
        - operator
        - value
      title: HubFileActivityConditionCompiled
      type: object
    HubNumberOfSearchesConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: hub_number_of_searches
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubNumberOfSearchesValue'
      required:
        - type
        - operator
        - value
      title: HubNumberOfSearchesConditionCompiled
      type: object
    HubPlaylistActivityConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: hub_playlist_activity
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubPlaylistActivityValue'
      required:
        - type
        - operator
        - value
      title: HubPlaylistActivityConditionCompiled
      type: object
    HubTimeSinceJoiningConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: hub_time_since_joining
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubTimeSinceJoiningValue'
      required:
        - type
        - operator
        - value
      title: HubTimeSinceJoiningConditionCompiled
      type: object
    HubUniqueLoginsConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: hub_unique_logins
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/HubUniqueLoginsValue'
      required:
        - type
        - operator
        - value
      title: HubUniqueLoginsConditionCompiled
      type: object
    LastNameConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: last_name
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/LastNameValue'
      required:
        - type
        - operator
        - value
      title: LastNameConditionCompiled
      type: object
    StateConditionCompiled:
      additionalProperties: false
      properties:
        display:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Display
        operator:
          title: Operator
          type: string
        type:
          const: state
          title: Type
          type: string
        value:
          $ref: '#/components/schemas/StateValue'
      required:
        - type
        - operator
        - value
      title: StateConditionCompiled
      type: object
    AttributeBooleanValueIn:
      additionalProperties: false
      properties:
        def_slug:
          maxLength: 255
          minLength: 1
          title: Def Slug
          type: string
      required:
        - def_slug
      title: AttributeBooleanValueIn
      type: object
    AttributeDateValueIn:
      additionalProperties: false
      properties:
        date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date
        date_from:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date From
        date_to:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date To
        def_slug:
          maxLength: 255
          minLength: 1
          title: Def Slug
          type: string
      required:
        - def_slug
      title: AttributeDateValueIn
      type: object
    AttributeMultipleValueIn:
      additionalProperties: false
      properties:
        def_slug:
          maxLength: 255
          minLength: 1
          title: Def Slug
          type: string
        option_slugs:
          items:
            type: string
          maxItems: 200
          minItems: 1
          title: Option Slugs
          type: array
      required:
        - def_slug
        - option_slugs
      title: AttributeMultipleValueIn
      type: object
    AttributeNumberValueIn:
      additionalProperties: false
      properties:
        def_slug:
          maxLength: 255
          minLength: 1
          title: Def Slug
          type: string
        number:
          anyOf:
            - type: number
            - type: 'null'
          title: Number
        number_max:
          anyOf:
            - type: number
            - type: 'null'
          title: Number Max
        number_min:
          anyOf:
            - type: number
            - type: 'null'
          title: Number Min
      required:
        - def_slug
      title: AttributeNumberValueIn
      type: object
    AttributeSingleValueIn:
      additionalProperties: false
      properties:
        def_slug:
          maxLength: 255
          minLength: 1
          title: Def Slug
          type: string
        option_slugs:
          items:
            type: string
          maxItems: 1
          minItems: 1
          title: Option Slugs
          type: array
      required:
        - def_slug
        - option_slugs
      title: AttributeSingleValueIn
      type: object
    AttributeTextValueIn:
      additionalProperties: false
      properties:
        def_slug:
          maxLength: 255
          minLength: 1
          title: Def Slug
          type: string
        text:
          maxLength: 1024
          minLength: 1
          title: Text
          type: string
      required:
        - def_slug
        - text
      title: AttributeTextValueIn
      type: object
    BelongsToHubValue:
      additionalProperties: false
      properties:
        hub_id:
          maxLength: 64
          minLength: 1
          title: Hub Id
          type: string
      required:
        - hub_id
      title: BelongsToHubValue
      type: object
    BillingStatusValue:
      additionalProperties: false
      description: '``billing_status`` value — single status or list for ``in`` operator.'
      properties:
        status:
          anyOf:
            - enum:
                - active
                - past_due
                - canceled
                - none
              type: string
            - type: 'null'
          title: Status
        statuses:
          anyOf:
            - items:
                enum:
                  - active
                  - past_due
                  - canceled
                  - none
                type: string
              maxItems: 4
              minItems: 1
              type: array
            - type: 'null'
          title: Statuses
      title: BillingStatusValue
      type: object
    CityValue:
      additionalProperties: false
      properties:
        text:
          maxLength: 255
          minLength: 1
          title: Text
          type: string
      required:
        - text
      title: CityValue
      type: object
    CountryValue:
      additionalProperties: false
      properties:
        code:
          maxLength: 2
          minLength: 2
          pattern: ^[A-Za-z]{2}$
          title: Code
          type: string
      required:
        - code
      title: CountryValue
      type: object
    DateRegisteredValue:
      additionalProperties: false
      description: |-
        Date-valued registration condition.

        Populate either ``date`` (for before/after) or ``date_from`` +
        ``date_to`` (for between) or ``days`` (for within_last_days).
        Cross-field validation happens at the resolver layer.
      properties:
        date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date
        date_from:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date From
        date_to:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date To
        days:
          anyOf:
            - maximum: 36500
              minimum: 1
              type: integer
            - type: 'null'
          title: Days
      title: DateRegisteredValue
      type: object
    EmailValue:
      additionalProperties: false
      properties:
        text:
          maxLength: 255
          minLength: 1
          title: Text
          type: string
      required:
        - text
      title: EmailValue
      type: object
    FirstNameValue:
      additionalProperties: false
      properties:
        text:
          maxLength: 255
          minLength: 1
          title: Text
          type: string
      required:
        - text
      title: FirstNameValue
      type: object
    HasPlanValue:
      additionalProperties: false
      description: |-
        ``has_plan`` value — UUID-pinned on both write and compiled sides.

        MIO equates "plan" with Stripe-style price, so the admin sends a
        ``price_id`` UUID. Like ``HasProductValue`` this collapses the In and
        Compiled shapes into a single model (plan §17.1 Option 2). Team
        ownership is enforced transitively via the parent product.
      properties:
        price_id:
          maxLength: 64
          minLength: 1
          title: Price Id
          type: string
      required:
        - price_id
      title: HasPlanValue
      type: object
    HasProductValue:
      additionalProperties: false
      properties:
        product_id:
          maxLength: 64
          minLength: 1
          title: Product Id
          type: string
      required:
        - product_id
      title: HasProductValue
      type: object
    HasTagValueIn:
      additionalProperties: false
      description: '``has_tag`` write shape — single slug or list (any-of).'
      properties:
        tag_slug:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          title: Tag Slug
        tag_slugs:
          anyOf:
            - items:
                type: string
              maxItems: 100
              minItems: 1
              type: array
            - type: 'null'
          title: Tag Slugs
      title: HasTagValueIn
      type: object
    HubAudienceRegistrationValue:
      additionalProperties: false
      properties:
        date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date
        date_from:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date From
        date_to:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date To
        hub_id:
          maxLength: 64
          minLength: 1
          title: Hub Id
          type: string
      required:
        - hub_id
      title: HubAudienceRegistrationValue
      type: object
    HubFileActivityValue:
      additionalProperties: false
      properties:
        hub_id:
          maxLength: 64
          minLength: 1
          title: Hub Id
          type: string
        node_id:
          maxLength: 64
          minLength: 1
          title: Node Id
          type: string
      required:
        - hub_id
        - node_id
      title: HubFileActivityValue
      type: object
    HubNumberOfSearchesValue:
      additionalProperties: false
      properties:
        count:
          minimum: 0
          title: Count
          type: integer
        hub_id:
          maxLength: 64
          minLength: 1
          title: Hub Id
          type: string
      required:
        - hub_id
        - count
      title: HubNumberOfSearchesValue
      type: object
    HubPlaylistActivityValue:
      additionalProperties: false
      properties:
        count:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          title: Count
        hub_id:
          maxLength: 64
          minLength: 1
          title: Hub Id
          type: string
        playlist_node_id:
          maxLength: 64
          minLength: 1
          title: Playlist Node Id
          type: string
      required:
        - hub_id
        - playlist_node_id
      title: HubPlaylistActivityValue
      type: object
    HubTimeSinceJoiningValue:
      additionalProperties: false
      properties:
        days:
          maximum: 36500
          minimum: 0
          title: Days
          type: integer
        hub_id:
          maxLength: 64
          minLength: 1
          title: Hub Id
          type: string
      required:
        - hub_id
        - days
      title: HubTimeSinceJoiningValue
      type: object
    HubUniqueLoginsValue:
      additionalProperties: false
      properties:
        count:
          minimum: 0
          title: Count
          type: integer
        hub_id:
          maxLength: 64
          minLength: 1
          title: Hub Id
          type: string
      required:
        - hub_id
        - count
      title: HubUniqueLoginsValue
      type: object
    LastNameValue:
      additionalProperties: false
      properties:
        text:
          maxLength: 255
          minLength: 1
          title: Text
          type: string
      required:
        - text
      title: LastNameValue
      type: object
    StateValue:
      additionalProperties: false
      properties:
        text:
          maxLength: 255
          minLength: 1
          title: Text
          type: string
      required:
        - text
      title: StateValue
      type: object
    AttributeBooleanValueCompiled:
      additionalProperties: false
      properties:
        def_id:
          maxLength: 64
          minLength: 1
          title: Def Id
          type: string
      required:
        - def_id
      title: AttributeBooleanValueCompiled
      type: object
    AttributeDateValueCompiled:
      additionalProperties: false
      properties:
        date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date
        date_from:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date From
        date_to:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Date To
        def_id:
          maxLength: 64
          minLength: 1
          title: Def Id
          type: string
      required:
        - def_id
      title: AttributeDateValueCompiled
      type: object
    AttributeMultipleValueCompiled:
      additionalProperties: false
      properties:
        def_id:
          maxLength: 64
          minLength: 1
          title: Def Id
          type: string
        option_ids:
          items:
            type: string
          maxItems: 200
          minItems: 1
          title: Option Ids
          type: array
      required:
        - def_id
        - option_ids
      title: AttributeMultipleValueCompiled
      type: object
    AttributeNumberValueCompiled:
      additionalProperties: false
      properties:
        def_id:
          maxLength: 64
          minLength: 1
          title: Def Id
          type: string
        number:
          anyOf:
            - type: number
            - type: 'null'
          title: Number
        number_max:
          anyOf:
            - type: number
            - type: 'null'
          title: Number Max
        number_min:
          anyOf:
            - type: number
            - type: 'null'
          title: Number Min
      required:
        - def_id
      title: AttributeNumberValueCompiled
      type: object
    AttributeSingleValueCompiled:
      additionalProperties: false
      properties:
        def_id:
          maxLength: 64
          minLength: 1
          title: Def Id
          type: string
        option_ids:
          items:
            type: string
          maxItems: 1
          minItems: 1
          title: Option Ids
          type: array
      required:
        - def_id
        - option_ids
      title: AttributeSingleValueCompiled
      type: object
    AttributeTextValueCompiled:
      additionalProperties: false
      properties:
        def_id:
          maxLength: 64
          minLength: 1
          title: Def Id
          type: string
        text:
          maxLength: 1024
          minLength: 1
          title: Text
          type: string
      required:
        - def_id
        - text
      title: AttributeTextValueCompiled
      type: object
    HasTagValueCompiled:
      additionalProperties: false
      description: '``has_tag`` compiled shape — single ID or list of IDs.'
      properties:
        tag_id:
          anyOf:
            - maxLength: 64
              minLength: 1
              type: string
            - type: 'null'
          title: Tag Id
        tag_ids:
          anyOf:
            - items:
                type: string
              maxItems: 100
              minItems: 1
              type: array
            - type: 'null'
          title: Tag Ids
      title: HasTagValueCompiled
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````