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

# Replace draft broadcast payload

> Replaces a draft's complete payload and can schedule it when `saveAsDraft` is false. Call `broadcasts.get` to inspect the draft first, or use `broadcasts.schedule` to keep its payload.



## OpenAPI

````yaml /api-reference/platform-api.json put /v1/broadcasts/{id}/draft
openapi: 3.1.1
info:
  title: ChatbotX
  version: 0.0.1
servers:
  - url: https://app.chatbotx.io/api
security:
  - bearerAuth: []
  - developerAccessToken: []
  - tokenInSearchParams: []
paths:
  /v1/broadcasts/{id}/draft:
    put:
      tags:
        - Broadcasts
      summary: Replace draft broadcast payload
      description: >-
        Replaces a draft's complete payload and can schedule it when
        `saveAsDraft` is false. Call `broadcasts.get` to inspect the draft
        first, or use `broadcasts.schedule` to keep its payload.
      operationId: broadcasts.updateDraft
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            pattern: ^\d+$
            description: Broadcast id. Get it from `broadcasts.list`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                channel:
                  enum:
                    - omnichannel
                    - webchat
                    - messenger
                    - whatsapp
                    - zalo
                    - smtp
                    - telegram
                    - instagram
                    - threads
                    - tiktok
                    - api
                  type: string
                  description: Channel to send the broadcast over.
                flowId:
                  type: string
                  pattern: ^\d+$
                  description: >-
                    Flow id (numeric string) to send. Provide this or
                    templateId, not both.
                templateId:
                  type: string
                  pattern: ^\d+$
                  description: >-
                    WhatsApp template id (numeric string) to send. Provide this
                    or flowId, not both.
                integrationWhatsappId:
                  type: string
                  pattern: ^\d+$
                  description: WhatsApp integration id (numeric string) to send from.
                integrationMessengerId:
                  type: string
                  pattern: ^\d+$
                  description: Messenger integration id (numeric string) to send from.
                templateData:
                  anyOf:
                    - type: object
                      properties:
                        header:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                enum:
                                  - text
                                  - image
                                  - video
                                  - document
                                  - location
                                type: string
                              text:
                                type: string
                              parameter_name:
                                type: string
                              image:
                                type: object
                                properties:
                                  link:
                                    type: string
                                required:
                                  - link
                              video:
                                type: object
                                properties:
                                  link:
                                    type: string
                                required:
                                  - link
                              document:
                                type: object
                                properties:
                                  link:
                                    type: string
                                required:
                                  - link
                              location:
                                type: object
                                properties:
                                  latitude:
                                    type: string
                                  longitude:
                                    type: string
                                  name:
                                    type: string
                                  address:
                                    type: string
                            required:
                              - type
                        body:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                const: text
                              text:
                                type: string
                              parameter_name:
                                type: string
                            required:
                              - text
                        button:
                          type: array
                          items:
                            anyOf:
                              - type: object
                                properties:
                                  sub_type:
                                    enum:
                                      - url
                                      - quick_reply
                                      - copy_code
                                      - flow
                                      - catalog
                                      - mpm
                                    type: string
                                  index:
                                    type: number
                                  text:
                                    type: string
                                  coupon_code:
                                    type: string
                                  payload:
                                    type: string
                                  flow_token:
                                    type: string
                                  flow_action_data:
                                    type: object
                                    propertyNames:
                                      type: string
                                    additionalProperties: {}
                                  flowSourceId:
                                    type: string
                                  navigateScreenId:
                                    type: string
                                  fieldMappings:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        paramKey:
                                          type: string
                                          minLength: 1
                                          maxLength: 64
                                        paramLabel:
                                          type: string
                                        customFieldId:
                                          anyOf:
                                            - type: string
                                              pattern: ^\d+$
                                            - type: 'null'
                                      required:
                                        - paramKey
                                        - customFieldId
                                  thumbnail_product_retailer_id:
                                    type: string
                                  sections:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        title:
                                          type: string
                                        product_items:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              product_retailer_id:
                                                type: string
                                            required:
                                              - product_retailer_id
                              - type: 'null'
                        carousel:
                          type: array
                          items:
                            type: object
                            properties:
                              card_index:
                                type: number
                              header:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      enum:
                                        - image
                                        - video
                                      type: string
                                    image:
                                      type: object
                                      properties:
                                        link:
                                          type: string
                                      required:
                                        - link
                                    video:
                                      type: object
                                      properties:
                                        link:
                                          type: string
                                      required:
                                        - link
                                  required:
                                    - type
                              body:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      const: text
                                    text:
                                      type: string
                                  required:
                                    - text
                              button:
                                type: array
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        sub_type:
                                          enum:
                                            - url
                                            - quick_reply
                                            - copy_code
                                            - flow
                                            - catalog
                                            - mpm
                                          type: string
                                        index:
                                          type: number
                                        text:
                                          type: string
                                        coupon_code:
                                          type: string
                                        payload:
                                          type: string
                                        flow_token:
                                          type: string
                                        flow_action_data:
                                          type: object
                                          propertyNames:
                                            type: string
                                          additionalProperties: {}
                                        flowSourceId:
                                          type: string
                                        navigateScreenId:
                                          type: string
                                        fieldMappings:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              paramKey:
                                                type: string
                                                minLength: 1
                                                maxLength: 64
                                              paramLabel:
                                                type: string
                                              customFieldId:
                                                anyOf:
                                                  - type: string
                                                    pattern: ^\d+$
                                                  - type: 'null'
                                            required:
                                              - paramKey
                                              - customFieldId
                                        thumbnail_product_retailer_id:
                                          type: string
                                        sections:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              title:
                                                type: string
                                              product_items:
                                                type: array
                                                items: {}
                                    - type: 'null'
                            required:
                              - card_index
                        limited_time_offer:
                          type: object
                          properties:
                            expiration_time_ms:
                              type: number
                          required:
                            - expiration_time_ms
                    - type: object
                      properties:
                        header:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                enum:
                                  - text
                                  - image
                                type: string
                              text:
                                type: string
                              parameter_name:
                                type: string
                              image:
                                type: object
                                properties:
                                  link:
                                    type: string
                                required:
                                  - link
                            required:
                              - type
                        body:
                          type: array
                          items:
                            type: object
                            properties:
                              text:
                                type: string
                              parameter_name:
                                type: string
                            required:
                              - text
                        button:
                          type: array
                          items:
                            type: object
                            properties:
                              sub_type:
                                enum:
                                  - url
                                  - phone_number
                                type: string
                              index:
                                type: number
                              text:
                                type: string
                              payload:
                                type: string
                            required:
                              - sub_type
                  description: >-
                    Parameters for the WhatsApp template, when sending a
                    single-page broadcast.
                buttons:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      label:
                        type: string
                      flowId:
                        type: string
                    required:
                      - id
                      - label
                  description: Button overrides for the WhatsApp template.
                targets:
                  type: array
                  items:
                    type: object
                    properties:
                      inboxId:
                        type: string
                        pattern: ^\d+$
                      flowId:
                        type: string
                        pattern: ^\d+$
                      templateId:
                        type: string
                        pattern: ^\d+$
                      templateData:
                        anyOf:
                          - type: object
                            properties:
                              header:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      enum:
                                        - text
                                        - image
                                        - video
                                        - document
                                        - location
                                      type: string
                                    text:
                                      type: string
                                    parameter_name:
                                      type: string
                                    image:
                                      type: object
                                      properties:
                                        link:
                                          type: string
                                      required:
                                        - link
                                    video:
                                      type: object
                                      properties:
                                        link:
                                          type: string
                                      required:
                                        - link
                                    document:
                                      type: object
                                      properties:
                                        link:
                                          type: string
                                      required:
                                        - link
                                    location:
                                      type: object
                                      properties:
                                        latitude:
                                          type: string
                                        longitude:
                                          type: string
                                        name:
                                          type: string
                                        address:
                                          type: string
                                  required:
                                    - type
                              body:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      const: text
                                    text:
                                      type: string
                                    parameter_name:
                                      type: string
                                  required:
                                    - text
                              button:
                                type: array
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        sub_type:
                                          enum:
                                            - url
                                            - quick_reply
                                            - copy_code
                                            - flow
                                            - catalog
                                            - mpm
                                          type: string
                                        index:
                                          type: number
                                        text:
                                          type: string
                                        coupon_code:
                                          type: string
                                        payload:
                                          type: string
                                        flow_token:
                                          type: string
                                        flow_action_data:
                                          type: object
                                          propertyNames:
                                            type: string
                                          additionalProperties: {}
                                        flowSourceId:
                                          type: string
                                        navigateScreenId:
                                          type: string
                                        fieldMappings:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              paramKey:
                                                type: string
                                                minLength: 1
                                                maxLength: 64
                                              paramLabel:
                                                type: string
                                              customFieldId:
                                                anyOf:
                                                  - type: string
                                                    pattern: ^\d+$
                                                  - type: 'null'
                                            required:
                                              - paramKey
                                              - customFieldId
                                        thumbnail_product_retailer_id:
                                          type: string
                                        sections:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              title:
                                                type: string
                                              product_items:
                                                type: array
                                                items: {}
                                    - type: 'null'
                              carousel:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    card_index:
                                      type: number
                                    header:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            enum:
                                              - image
                                              - video
                                            type: string
                                          image:
                                            type: object
                                            properties:
                                              link: {}
                                          video:
                                            type: object
                                            properties:
                                              link: {}
                                        required:
                                          - type
                                    body:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            const: text
                                          text:
                                            type: string
                                        required:
                                          - text
                                    button:
                                      type: array
                                      items:
                                        anyOf:
                                          - type: object
                                            properties:
                                              sub_type:
                                                enum:
                                                  - url
                                                  - quick_reply
                                                  - copy_code
                                                  - flow
                                                  - catalog
                                                  - mpm
                                                type: string
                                              index:
                                                type: number
                                              text:
                                                type: string
                                              coupon_code:
                                                type: string
                                              payload:
                                                type: string
                                              flow_token:
                                                type: string
                                              flow_action_data:
                                                type: object
                                                propertyNames: {}
                                                additionalProperties: {}
                                              flowSourceId:
                                                type: string
                                              navigateScreenId:
                                                type: string
                                              fieldMappings:
                                                type: array
                                                items: {}
                                              thumbnail_product_retailer_id:
                                                type: string
                                              sections:
                                                type: array
                                                items: {}
                                          - type: 'null'
                                  required:
                                    - card_index
                              limited_time_offer:
                                type: object
                                properties:
                                  expiration_time_ms:
                                    type: number
                                required:
                                  - expiration_time_ms
                          - type: object
                            properties:
                              header:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      enum:
                                        - text
                                        - image
                                      type: string
                                    text:
                                      type: string
                                    parameter_name:
                                      type: string
                                    image:
                                      type: object
                                      properties:
                                        link:
                                          type: string
                                      required:
                                        - link
                                  required:
                                    - type
                              body:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    text:
                                      type: string
                                    parameter_name:
                                      type: string
                                  required:
                                    - text
                              button:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    sub_type:
                                      enum:
                                        - url
                                        - phone_number
                                      type: string
                                    index:
                                      type: number
                                    text:
                                      type: string
                                    payload:
                                      type: string
                                  required:
                                    - sub_type
                      buttons:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            label:
                              type: string
                            flowId:
                              type: string
                          required:
                            - id
                            - label
                    required:
                      - inboxId
                  description: >-
                    Per-page targets for a multi-page broadcast, each with its
                    own template/flow.
                inboxIds:
                  type: array
                  items:
                    type: string
                    pattern: ^\d+$
                  description: Inbox ids (numeric strings) this broadcast sends from.
                subaction:
                  enum:
                    - allContacts
                    - messengerActiveContacts
                    - messengerTemplateMessage
                    - whatsappTemplateMessage
                    - whatsappWithin24Hours
                    - instagramActiveContacts
                    - telegramAllContacts
                    - tiktokActiveContacts
                  type: string
                  description: Audience sub-action filter.
                schedulesType:
                  enum:
                    - now
                    - future
                  type: string
                  description: >-
                    When to send: immediately (`now`) or at `schedulesAt`
                    (`future`).
                schedulesAt:
                  anyOf:
                    - type: string
                    - type: 'null'
                  description: >-
                    ISO 8601 send time, required when schedulesType is `future`
                    and not a draft.
                contactFilter:
                  type: object
                  properties:
                    operator:
                      enum:
                        - and
                        - or
                      type: string
                    conditions:
                      type: array
                      items:
                        anyOf:
                          - anyOf:
                              - type: object
                                properties:
                                  field:
                                    const: locale
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: language
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: fullName
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: country
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: continent
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: gender
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: subscribedToBroadcast
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: contactCreatedAt
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: source
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: conversationTransferredToHuman
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: interactedInLast24h
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: followUp
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: archived
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: blocked
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: currentChannel
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: inbox
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: timezone
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: lastSeen
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: lastSent
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: lastInteraction
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: contactCreatedDateMinutesAgo
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: lastSeenMinutesAgo
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: lastInteractionMinutesAgo
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: lastUserInput
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: lastComment
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: lastUserInputType
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: email
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: phone
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: hasContactInfo
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: tags
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: broadcastSent
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: broadcastDelivered
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: broadcastSeen
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: broadcastClicked
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: broadcastFailed
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: subscribedToDripCampaign
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: entryPointsLinks
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: questionnaireStarted
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: questionnaireInProgress
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: questionnaireFinished
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: conversationAssigned
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: unreplied
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: unread
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: existingContact
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: consecutiveAiFailures
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: emailWasVerified
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: optedInForEmail
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: fromCtwaAd
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                              - type: object
                                properties:
                                  field:
                                    const: ctwaConversion
                                  operator:
                                    enum:
                                      - in
                                      - notIn
                                      - isEmpty
                                      - isNotEmpty
                                      - eq
                                      - ne
                                      - startsWith
                                      - endsWith
                                      - contains
                                      - notContains
                                      - lt
                                      - lte
                                      - gt
                                      - gte
                                      - isBetween
                                      - notBetween
                                      - used
                                    type: string
                                  value:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: array
                                        items:
                                          type: string
                                          minLength: 1
                                          maxLength: 255
                                      - type: array
                                        prefixItems:
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                          - type: string
                                            minLength: 1
                                            maxLength: 255
                                required:
                                  - field
                                  - operator
                          - type: object
                            properties:
                              field:
                                const: customField
                              customFieldId:
                                type: string
                                minLength: 1
                              customFieldType:
                                enum:
                                  - shortText
                                  - email
                                  - phoneNumber
                                  - number
                                  - date
                                  - datetime
                                  - boolean
                                  - longText
                                type: string
                              valueType:
                                enum:
                                  - multiSelect
                                  - select
                                  - text
                                  - boolean
                                  - datetime
                                  - number
                                type: string
                              operator:
                                enum:
                                  - in
                                  - notIn
                                  - isEmpty
                                  - isNotEmpty
                                  - eq
                                  - ne
                                  - startsWith
                                  - endsWith
                                  - contains
                                  - notContains
                                  - lt
                                  - lte
                                  - gt
                                  - gte
                                  - isBetween
                                  - notBetween
                                  - used
                                type: string
                              value:
                                anyOf:
                                  - type: string
                                    minLength: 1
                                    maxLength: 255
                                  - type: array
                                    prefixItems:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                            required:
                              - field
                              - customFieldId
                              - valueType
                              - operator
                          - type: object
                            properties:
                              field:
                                const: botField
                              botFieldId:
                                type: string
                                minLength: 1
                              botFieldType:
                                enum:
                                  - shortText
                                  - email
                                  - phoneNumber
                                  - number
                                  - date
                                  - datetime
                                  - boolean
                                  - longText
                                type: string
                              valueType:
                                enum:
                                  - multiSelect
                                  - select
                                  - text
                                  - boolean
                                  - datetime
                                  - number
                                type: string
                              operator:
                                enum:
                                  - in
                                  - notIn
                                  - isEmpty
                                  - isNotEmpty
                                  - eq
                                  - ne
                                  - startsWith
                                  - endsWith
                                  - contains
                                  - notContains
                                  - lt
                                  - lte
                                  - gt
                                  - gte
                                  - isBetween
                                  - notBetween
                                  - used
                                type: string
                              value:
                                anyOf:
                                  - type: string
                                    minLength: 1
                                    maxLength: 255
                                  - type: array
                                    prefixItems:
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                                      - type: string
                                        minLength: 1
                                        maxLength: 255
                            required:
                              - field
                              - botFieldId
                              - valueType
                              - operator
                          - type: object
                            properties:
                              field:
                                const: couponTopic
                              topicId:
                                type: string
                                minLength: 1
                              operator:
                                enum:
                                  - in
                                  - notIn
                                  - isEmpty
                                  - isNotEmpty
                                  - eq
                                  - ne
                                  - startsWith
                                  - endsWith
                                  - contains
                                  - notContains
                                  - lt
                                  - lte
                                  - gt
                                  - gte
                                  - isBetween
                                  - notBetween
                                  - used
                                type: string
                              value:
                                type: string
                                minLength: 1
                                maxLength: 255
                            required:
                              - field
                              - topicId
                              - operator
                          - type: object
                            properties:
                              field:
                                const: ctwaRetarget
                              segment:
                                enum:
                                  - conversations
                                  - leads
                                  - purchases
                                type: string
                              adId:
                                type: string
                                minLength: 1
                              integrationWhatsappId:
                                type: string
                                pattern: ^\d+$
                              channel:
                                enum:
                                  - whatsapp
                                  - messenger
                                  - instagram
                                type: string
                              since:
                                type: string
                                pattern: ^\d{4}-\d{2}-\d{2}$
                              until:
                                type: string
                                pattern: ^\d{4}-\d{2}-\d{2}$
                            required:
                              - field
                              - segment
                              - since
                              - until
                    timezone:
                      type: string
                      maxLength: 64
                  required:
                    - operator
                    - conditions
                  description: >-
                    Structured filter selecting the recipient audience. See
                    `contacts.listFilterFields`.
                saveAsDraft:
                  type: boolean
                  description: Save as a draft instead of scheduling/sending immediately.
              required:
                - channel
                - subaction
                - schedulesType
                - schedulesAt
                - contactFilter
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    enum:
                      - scheduled
                      - sent
                      - sending
                      - cancelled
                      - draft
                      - failed
                    type: string
                required:
                  - id
                  - status
        '400':
          description: '400'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: businessError
                      status:
                        const: 400
                      message:
                        type: string
                        default: An error occurred while processing your request
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: UNAUTHORIZED
                      status:
                        const: 401
                      message:
                        type: string
                        default: Authentication required
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: INVALID_CHATBOT_TOKEN
                      status:
                        const: 401
                      message:
                        type: string
                        default: Invalid or missing workspace API token
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: FORBIDDEN
                      status:
                        const: 403
                      message:
                        type: string
                        default: You do not have permission to perform this action
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: trialExpired
                      status:
                        const: 403
                      message:
                        type: string
                        default: Trial expired
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: macLimitReached
                      status:
                        const: 403
                      message:
                        type: string
                        default: Monthly active contact limit reached
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: notFound
                      status:
                        const: 404
                      message:
                        type: string
                        default: Resource not found
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: invalidRequestData
                      status:
                        const: 422
                      message:
                        type: string
                        default: Input validation failed
                      data:
                        type: object
                        properties:
                          issues:
                            type: array
                            items:
                              type: object
                              properties:
                                message:
                                  type: string
                                path:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: object
                                        properties:
                                          key:
                                            anyOf:
                                              - type: string
                                              - type: number
                                        required:
                                          - key
                                        additionalProperties: {}
                              required:
                                - message
                              additionalProperties: {}
                        required:
                          - issues
                        additionalProperties: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                      - data
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: validation
                      status:
                        const: 422
                      message:
                        type: string
                        default: Validation error
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: tooManyRequests
                      status:
                        const: 429
                      message:
                        type: string
                        default: Too many requests
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '500':
          description: '500'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: INTERNAL_SERVER_ERROR
                      status:
                        const: 500
                      message:
                        type: string
                        default: An unexpected error occurred
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
components:
  schemas:
    UndefinedError:
      type: object
      properties:
        defined:
          const: false
        code:
          type: string
        status:
          type: number
        message:
          type: string
        data: {}
      required:
        - defined
        - code
        - status
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    developerAccessToken:
      type: http
      scheme: bearer
    tokenInSearchParams:
      type: apiKey
      in: query
      name: token

````