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

> Partial-update a draft automation.

Uses ``exclude_unset`` semantics: only fields present in the request
body are applied.  Returns 404 if not found.



## OpenAPI

````yaml /openapi/mio-openapi.json patch /api/v1/teams/{team_id}/hubs/{hub_id}/automations/{automation_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}/hubs/{hub_id}/automations/{automation_id}:
    patch:
      tags:
        - automations
      summary: Update Automation
      description: |-
        Partial-update a draft automation.

        Uses ``exclude_unset`` semantics: only fields present in the request
        body are applied.  Returns 404 if not found.
      operationId: >-
        automations.patch_automations_patch_teams_by_team_id_hubs_by_hub_id_automations_by_automation_id
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
        - in: path
          name: automation_id
          required: true
          schema:
            title: Automation Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AutomationUpdateEnvelope'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AutomationResponse'
          description: Successful Response
        '400':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Bad request
        '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: Not found
        '409':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Status conflict
        '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: Graph validation error
      security:
        - HTTPBearer: []
components:
  schemas:
    AutomationUpdateEnvelope:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/AutomationUpdateResource'
      required:
        - data
      title: AutomationUpdateEnvelope
      type: object
    AutomationResponse:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/AutomationResource'
      required:
        - data
      title: AutomationResponse
      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
    AutomationUpdateResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/AutomationUpdateAttributes'
        type:
          const: automations
          title: Type
          type: string
      required:
        - type
        - attributes
      title: AutomationUpdateResource
      type: object
    AutomationResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/AutomationAttributes'
        id:
          title: Id
          type: string
        type:
          const: automations
          default: automations
          title: Type
          type: string
      required:
        - id
        - attributes
      title: AutomationResource
      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
    AutomationUpdateAttributes:
      additionalProperties: false
      properties:
        definition:
          anyOf:
            - $ref: '#/components/schemas/AutomationDefinition'
            - type: 'null'
        name:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          title: Name
        re_entry_interval_seconds:
          anyOf:
            - maximum: 2147483647
              minimum: 1
              type: integer
            - type: 'null'
          title: Re Entry Interval Seconds
        re_entry_mode:
          anyOf:
            - enum:
                - never
                - after_exit
                - interval
              type: string
            - type: 'null'
          title: Re Entry Mode
        settings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Settings
      title: AutomationUpdateAttributes
      type: object
    AutomationAttributes:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        current_version_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Current Version Id
        deleted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Deleted At
        hub_id:
          title: Hub Id
          type: string
        name:
          title: Name
          type: string
        re_entry_interval_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Re Entry Interval Seconds
        re_entry_mode:
          title: Re Entry Mode
          type: string
        settings:
          additionalProperties: true
          title: Settings
          type: object
        status:
          title: Status
          type: string
        team_id:
          title: Team Id
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - team_id
        - hub_id
        - name
        - status
        - re_entry_mode
        - re_entry_interval_seconds
        - current_version_id
        - settings
        - created_by
        - created_at
        - updated_at
      title: AutomationAttributes
      type: object
    AutomationDefinition:
      additionalProperties: false
      description: |-
        The full graph definition stored in ``automation_versions.definition``.

        Validated at publish time via ``AutomationsService.validate_graph``.
      properties:
        edges:
          items:
            $ref: '#/components/schemas/AutomationEdge'
          maxItems: 5000
          title: Edges
          type: array
        nodes:
          items:
            discriminator:
              mapping:
                add_tag:
                  $ref: '#/components/schemas/AddTagNode'
                branch:
                  $ref: '#/components/schemas/BranchNode'
                enroll_in_sequence:
                  $ref: '#/components/schemas/EnrollInSequenceNode'
                exit:
                  $ref: '#/components/schemas/ExitNode'
                remove_tag:
                  $ref: '#/components/schemas/RemoveTagNode'
                send_email:
                  $ref: '#/components/schemas/SendEmailNode'
                wait:
                  $ref: '#/components/schemas/WaitNode'
                webhook:
                  $ref: '#/components/schemas/WebhookNode'
              propertyName: type
            oneOf:
              - $ref: '#/components/schemas/SendEmailNode'
              - $ref: '#/components/schemas/WaitNode'
              - $ref: '#/components/schemas/BranchNode'
              - $ref: '#/components/schemas/AddTagNode'
              - $ref: '#/components/schemas/RemoveTagNode'
              - $ref: '#/components/schemas/EnrollInSequenceNode'
              - $ref: '#/components/schemas/ExitNode'
              - $ref: '#/components/schemas/WebhookNode'
          maxItems: 500
          minItems: 1
          title: Nodes
          type: array
        triggers:
          items:
            $ref: '#/components/schemas/AutomationTriggerIn'
          maxItems: 50
          title: Triggers
          type: array
      required:
        - nodes
      title: AutomationDefinition
      type: object
    AutomationEdge:
      additionalProperties: false
      description: |-
        A directed edge in the automation graph.

        ``branch_label`` is required when the source node is a ``branch``
        type — the executor routes via this label (e.g. ``"yes"`` / ``"no"``).
      properties:
        branch_label:
          anyOf:
            - maxLength: 100
              type: string
            - type: 'null'
          title: Branch Label
        from:
          maxLength: 100
          minLength: 1
          title: From
          type: string
        to:
          maxLength: 100
          minLength: 1
          title: To
          type: string
      required:
        - from
        - to
      title: AutomationEdge
      type: object
    AddTagNode:
      additionalProperties: false
      properties:
        config:
          $ref: '#/components/schemas/AddTagNodeConfig'
        id:
          maxLength: 100
          minLength: 1
          title: Id
          type: string
        type:
          const: add_tag
          title: Type
          type: string
      required:
        - type
        - id
        - config
      title: AddTagNode
      type: object
    BranchNode:
      additionalProperties: false
      properties:
        config:
          $ref: '#/components/schemas/BranchNodeConfig'
        id:
          maxLength: 100
          minLength: 1
          title: Id
          type: string
        type:
          const: branch
          title: Type
          type: string
      required:
        - type
        - id
        - config
      title: BranchNode
      type: object
    EnrollInSequenceNode:
      additionalProperties: false
      properties:
        config:
          $ref: '#/components/schemas/EnrollInSequenceNodeConfig'
        id:
          maxLength: 100
          minLength: 1
          title: Id
          type: string
        type:
          const: enroll_in_sequence
          title: Type
          type: string
      required:
        - type
        - id
        - config
      title: EnrollInSequenceNode
      type: object
    ExitNode:
      additionalProperties: false
      properties:
        config:
          $ref: '#/components/schemas/ExitNodeConfig'
        id:
          maxLength: 100
          minLength: 1
          title: Id
          type: string
        type:
          const: exit
          title: Type
          type: string
      required:
        - type
        - id
      title: ExitNode
      type: object
    RemoveTagNode:
      additionalProperties: false
      properties:
        config:
          $ref: '#/components/schemas/RemoveTagNodeConfig'
        id:
          maxLength: 100
          minLength: 1
          title: Id
          type: string
        type:
          const: remove_tag
          title: Type
          type: string
      required:
        - type
        - id
        - config
      title: RemoveTagNode
      type: object
    SendEmailNode:
      additionalProperties: false
      properties:
        config:
          $ref: '#/components/schemas/SendEmailNodeConfig'
        id:
          maxLength: 100
          minLength: 1
          title: Id
          type: string
        type:
          const: send_email
          title: Type
          type: string
      required:
        - type
        - id
        - config
      title: SendEmailNode
      type: object
    WaitNode:
      additionalProperties: false
      properties:
        config:
          $ref: '#/components/schemas/WaitNodeConfig'
        id:
          maxLength: 100
          minLength: 1
          title: Id
          type: string
        type:
          const: wait
          title: Type
          type: string
      required:
        - type
        - id
        - config
      title: WaitNode
      type: object
    WebhookNode:
      additionalProperties: false
      description: |-
        A ``webhook`` node that POSTs a signed payload to an external URL.

        The node handler (in ``nodes.py``) records a ``webhook_deliveries`` row
        (status ``pending``) and advances the enrollment.  The actual HTTP POST
        is performed asynchronously by the T7 delivery worker.
      properties:
        config:
          $ref: '#/components/schemas/WebhookNodeConfig'
        id:
          maxLength: 100
          minLength: 1
          title: Id
          type: string
        type:
          const: webhook
          title: Type
          type: string
      required:
        - type
        - id
        - config
      title: WebhookNode
      type: object
    AutomationTriggerIn:
      additionalProperties: false
      description: |-
        A trigger that fires when ``event_type`` is observed.

        ``entry_filter`` is an optional condition tree evaluated against the
        enrolling contact; only contacts matching all groups are enrolled.
      properties:
        entry_filter:
          anyOf:
            - $ref: '#/components/schemas/ConditionTreeIn'
            - type: 'null'
        event_type:
          maxLength: 100
          minLength: 1
          title: Event Type
          type: string
      required:
        - event_type
      title: AutomationTriggerIn
      type: object
    AddTagNodeConfig:
      additionalProperties: false
      description: Config for an ``add_tag`` node.
      properties:
        tag_id:
          maxLength: 64
          minLength: 1
          title: Tag Id
          type: string
      required:
        - tag_id
      title: AddTagNodeConfig
      type: object
    BranchNodeConfig:
      additionalProperties: false
      description: >-
        Config for a ``branch`` node.


        ``condition_tree`` is compiled via
        ``SegmentsService.compile_conditions``

        at publish time. Branches route to edges by ``branch_label``

        (typically ``"yes"`` / ``"no"``).
      properties:
        condition_tree:
          $ref: '#/components/schemas/ConditionTreeIn'
      required:
        - condition_tree
      title: BranchNodeConfig
      type: object
    EnrollInSequenceNodeConfig:
      additionalProperties: false
      description: |-
        Config for an ``enroll_in_sequence`` node.

        This node type is **terminal** (design §locked-decision-3): upon
        execution the enrollment is marked ``completed`` with
        ``exit_reason='handed_off_to_sequence'``.
      properties:
        drip_campaign_id:
          maxLength: 64
          minLength: 1
          title: Drip Campaign Id
          type: string
      required:
        - drip_campaign_id
      title: EnrollInSequenceNodeConfig
      type: object
    ExitNodeConfig:
      additionalProperties: false
      description: |-
        Config for an explicit ``exit`` node.

        ``reason`` is a short machine label stored in ``exit_reason``.
      properties:
        reason:
          default: explicit_exit
          maxLength: 100
          title: Reason
          type: string
      title: ExitNodeConfig
      type: object
    RemoveTagNodeConfig:
      additionalProperties: false
      description: Config for a ``remove_tag`` node.
      properties:
        tag_id:
          maxLength: 64
          minLength: 1
          title: Tag Id
          type: string
      required:
        - tag_id
      title: RemoveTagNodeConfig
      type: object
    SendEmailNodeConfig:
      additionalProperties: false
      description: |-
        Config for a ``send_email`` node.

        ``template_ref`` is a logical reference (e.g. ``welcome_email``);
        ``template_id`` is an internal UUID for a stored template.
        ``context_keys`` lists the merge tag keys the template uses.
        Exactly one of ``template_ref`` / ``template_id`` is expected.
      properties:
        context_keys:
          items:
            type: string
          title: Context Keys
          type: array
        template_id:
          anyOf:
            - maxLength: 64
              type: string
            - type: 'null'
          title: Template Id
        template_ref:
          anyOf:
            - maxLength: 255
              type: string
            - type: 'null'
          title: Template Ref
      title: SendEmailNodeConfig
      type: object
    WaitNodeConfig:
      additionalProperties: false
      description: |-
        Config for a ``wait`` node.

        ``duration`` is a natural-language string accepted by the parser in
        ``AutomationsService.parse_wait_duration``, e.g.
        ``"3 days"``, ``"2 hours"``, ``"30 minutes"``, ``"1 week"``.
        Max resolved duration: 365 days.
      properties:
        duration:
          maxLength: 64
          minLength: 1
          title: Duration
          type: string
      required:
        - duration
      title: WaitNodeConfig
      type: object
    WebhookNodeConfig:
      additionalProperties: false
      description: |-
        Config for a ``webhook`` node.

        V1 uses ``webhook_endpoint_id`` (references a ``webhook_endpoints`` row
        that holds the target_url + signing_secret).  The URL is validated once
        at endpoint-registration time; the SSRF guard re-checks at delivery time
        to defeat DNS rebinding.

        ``webhook_endpoint_id`` is the preferred (and only V1) form.  A future
        version may add an inline ``url`` field for one-off targets.

        ``payload_template`` is an optional dict of extra fields to merge into
        the automation envelope payload before posting.  Defaults to an empty
        dict (the standard automation envelope is always included).
      properties:
        payload_template:
          additionalProperties: true
          title: Payload Template
          type: object
        webhook_endpoint_id:
          maxLength: 64
          minLength: 1
          title: Webhook Endpoint Id
          type: string
      required:
        - webhook_endpoint_id
      title: WebhookNodeConfig
      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
    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
    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
    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
  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

````