oneOf:
  - type: object
    title: WhatsApp Cloud channel
    required:
      - type
      - phone_number
      - provider
      - provider_config
    properties:
      type:
        type: string
        enum: ['whatsapp']
        example: whatsapp
      phone_number:
        type: string
        description: WhatsApp phone number
        example: '+15551234567'
      provider:
        type: string
        description: WhatsApp provider
        enum: ['whatsapp_cloud']
        example: whatsapp_cloud
      provider_config:
        type: object
        description: WhatsApp Cloud provider configuration
        required:
          - api_key
          - phone_number_id
          - business_account_id
        properties:
          api_key:
            type: string
            description: WhatsApp Cloud API key
            example: your-api-key
          phone_number_id:
            type: string
            description: Phone number ID for WhatsApp Cloud
            example: your-phone-number-id
          business_account_id:
            type: string
            description: Business account ID for WhatsApp Cloud
            example: your-business-account-id
        example:
          api_key: your-api-key
          phone_number_id: your-phone-number-id
          business_account_id: your-business-account-id
  - type: object
    title: Legacy 360dialog WhatsApp channel
    deprecated: true
    required:
      - type
      - phone_number
      - provider_config
    properties:
      type:
        type: string
        enum: ['whatsapp']
        example: whatsapp
      phone_number:
        type: string
        description: WhatsApp phone number
        example: '+15551234567'
      provider:
        type: string
        description: Legacy 360dialog provider. Omit this field or use `default` only for existing deprecated 360dialog setups.
        enum: ['default']
        deprecated: true
        example: default
      provider_config:
        type: object
        description: Legacy 360dialog provider configuration
        required:
          - api_key
        properties:
          api_key:
            type: string
            description: 360dialog API key
            example: your-api-key
        example:
          api_key: your-api-key
