title: WhatsApp Connection
type: object
description: Reports WhatsApp connection setup and credential health; integration settings are reported alongside the connection in the integration response.
required:
  - uuid
  - waba_id
  - phone_number_id
  - setup_status
  - setup_error
  - business_id
  - business_name
  - business_phone_number
  - token_expires_at
  - token_status
  - token_checked_at
  - created_at
properties:
  uuid:
    type: string
    format: uuid
    description: The connection's unique identifier.
    readOnly: true
  waba_id:
    type: string
    minLength: 1
    maxLength: 255
    example: '123456'
    description: The WhatsApp Business Account ID provided to iglooX.
  phone_number_id:
    type: string
    minLength: 1
    maxLength: 255
    example: '654321'
    description: The WhatsApp Phone Number ID provided to iglooX.
  setup_status:
    type: string
    enum: [pending, succeeded, failed]
    description: Configurations start pending and cannot be edited or deactivated until setup succeeds or fails. Activation requires that no configuration exists. Successful setup includes recording the sending limits reported by Meta. Messaging also depends on credential health and template availability.
    readOnly: true
  setup_error:
    description: |
      Stable setup failure identifier, or null before failure. Fixed explanations:

      - `whatsapp_phone_number_not_found`: the selected WhatsApp phone number could not be found.
      - `whatsapp_two_step_verification_pin_incorrect`: the PIN does not match the phone number's two-step verification PIN; use the existing PIN or reset it in WhatsApp Manager.
      - `whatsapp_message_templates_incompatible`: update incompatible system message templates before connecting again.
      - `whatsapp_activation_failed`: setup could not complete; check the connection details and try again.

      Deactivate the failed connection before creating a new connection.
    oneOf:
      - type: string
        enum:
          - whatsapp_phone_number_not_found
          - whatsapp_two_step_verification_pin_incorrect
          - whatsapp_message_templates_incompatible
          - whatsapp_activation_failed
      - type: 'null'
    readOnly: true
  business_id:
    type: [string, 'null']
    minLength: 1
    maxLength: 255
    example: '112233445566778'
    description: The ID of the Meta business that owns the WhatsApp Business Account, returned by Meta during activation.
    readOnly: true
  business_name:
    type: [string, 'null']
    minLength: 1
    maxLength: 255
    example: Igloo Coffee
    description: The name of the Meta business that owns the WhatsApp Business Account, returned by Meta during activation.
    readOnly: true
  business_phone_number:
    type: [string, 'null']
    minLength: 1
    maxLength: 255
    example: '+61 7 1234 5678'
    description: The WhatsApp business display phone number returned by Meta.
    readOnly: true
  token_expires_at:
    type: [string, 'null']
    format: date-time
    description: The provider-reported effective token expiration, or null when no fixed expiration is known. Tokens are not automatically refreshed; deactivate the configuration and create a new connection when credentials expire or become invalid.
    readOnly: true
  token_status:
    type: string
    enum: [unknown, valid, expired, invalid]
    description: Observed credential health, independent of connection setup state. Unknown means the credentials have not yet been inspected.
    readOnly: true
  token_checked_at:
    type: [string, 'null']
    format: date-time
    description: When the credentials were last successfully inspected. Transient provider failures retain the last observation. Health is checked during activation and hourly thereafter.
    readOnly: true
  created_at:
    type: string
    format: date-time
    description: The date-time that the configuration was first created.
    readOnly: true
x-tags:
  - Models
