> ## Documentation Index
> Fetch the complete documentation index at: https://kapso-1adbad2d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get WhatsApp config health status

> Performs a comprehensive health check on a WhatsApp configuration to verify its operational status.

**Health Checks Performed:**
- Phone number access verification
- Messaging health status (ability to send messages)
- Webhook subscription status
- Webhook verification status

**Response Status:**
- `healthy`: All checks pass
- `degraded`: Some non-critical checks fail (e.g., webhook issues)
- `unhealthy`: Critical checks fail (e.g., phone number access, token validity)
- `error`: Service error occurred during health check

**Note:** Test message sending is disabled by default for performance reasons.




## OpenAPI

````yaml api/legacy/openapi-platform.yaml get /whatsapp_configs/{whatsapp_config_id}/health
openapi: 3.0.3
info:
  title: Kapso Platform API
  description: >-
    Build WhatsApp automation into your SaaS. Let your customers connect their
    own WhatsApp Business accounts.
  version: 1.0.0
  contact:
    name: Kapso Support
servers:
  - url: https://app.kapso.ai/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /whatsapp_configs/{whatsapp_config_id}/health:
    get:
      tags:
        - WhatsApp Configs
      summary: Get WhatsApp config health status
      description: >
        Performs a comprehensive health check on a WhatsApp configuration to
        verify its operational status.


        **Health Checks Performed:**

        - Phone number access verification

        - Messaging health status (ability to send messages)

        - Webhook subscription status

        - Webhook verification status


        **Response Status:**

        - `healthy`: All checks pass

        - `degraded`: Some non-critical checks fail (e.g., webhook issues)

        - `unhealthy`: Critical checks fail (e.g., phone number access, token
        validity)

        - `error`: Service error occurred during health check


        **Note:** Test message sending is disabled by default for performance
        reasons.
      operationId: getWhatsappConfigHealth
      parameters:
        - name: whatsapp_config_id
          in: path
          required: true
          schema:
            type: string
          description: ID of the WhatsApp configuration to check
      responses:
        '200':
          description: Health check completed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - healthy
                      - degraded
                      - unhealthy
                      - error
                    description: Overall health status
                    example: healthy
                  checks:
                    type: object
                    description: Individual health check results
                    properties:
                      phone_number_access:
                        type: object
                        properties:
                          passed:
                            type: boolean
                          details:
                            type: object
                            properties:
                              verified_name:
                                type: string
                                example: Company Name
                              display_phone_number:
                                type: string
                                example: '+1234567890'
                              quality_rating:
                                type: string
                                example: GREEN
                              id:
                                type: string
                                example: '1234567890'
                          error:
                            type: string
                            description: Error message if check failed
                      messaging_health:
                        type: object
                        properties:
                          passed:
                            type: boolean
                          overall_status:
                            type: string
                            enum:
                              - AVAILABLE
                              - LIMITED
                              - BLOCKED
                            example: AVAILABLE
                          details:
                            type: object
                            properties:
                              can_send_message:
                                type: string
                                example: AVAILABLE
                              entities:
                                type: array
                                description: Health status of individual entities
                                items:
                                  type: object
                      webhook_subscription:
                        type: object
                        properties:
                          passed:
                            type: boolean
                          details:
                            type: object
                            properties:
                              app_id:
                                type: string
                                example: '123456789'
                              subscribed:
                                type: boolean
                                example: true
                              subscribed_fields:
                                type: array
                                items:
                                  type: string
                                example:
                                  - messages
                                  - message_deliveries
                          error:
                            type: string
                      webhook_verified:
                        type: object
                        properties:
                          passed:
                            type: boolean
                          details:
                            type: object
                            properties:
                              verified_at:
                                type: string
                                format: date-time
                                example: '2024-01-20T10:00:00Z'
                              message:
                                type: string
                                example: >-
                                  Webhook successfully verified at 2024-01-20
                                  10:00:00 UTC
                  timestamp:
                    type: string
                    format: date-time
                    description: When the health check was performed
                    example: '2024-01-20T10:00:00Z'
                  error:
                    type: string
                    description: Error message if overall health check failed
              examples:
                healthy_config:
                  summary: Healthy WhatsApp configuration
                  value:
                    status: healthy
                    checks:
                      phone_number_access:
                        passed: true
                        details:
                          verified_name: My Business
                          display_phone_number: +1 555-123-4567
                          quality_rating: GREEN
                          id: '123456789012345'
                      messaging_health:
                        passed: true
                        overall_status: AVAILABLE
                        details:
                          can_send_message: AVAILABLE
                          entities:
                            - entity_type: PHONE_NUMBER
                              id: '123456789012345'
                              can_send_message: AVAILABLE
                            - entity_type: WABA
                              id: '987654321098765'
                              can_send_message: AVAILABLE
                            - entity_type: BUSINESS
                              id: '456789012345678'
                              can_send_message: AVAILABLE
                            - entity_type: APP
                              id: '789012345678901'
                              can_send_message: AVAILABLE
                      webhook_subscription:
                        passed: true
                        details:
                          app_id: 789012345678901
                          subscribed: true
                          subscribed_fields: null
                      webhook_verified:
                        passed: true
                        details:
                          verified_at: '2024-01-15T10:30:00.000Z'
                          message: >-
                            Webhook successfully verified at 2024-01-15 10:30:00
                            UTC
                    timestamp: '2024-01-20T14:25:30Z'
                unhealthy_payment_method:
                  summary: Unhealthy - Payment method error (Meta billing issue)
                  description: >
                    Shows a common issue where the WhatsApp Business Account has
                    payment method problems.

                    This must be resolved in Meta Business Manager, not in
                    Kapso.
                  value:
                    status: unhealthy
                    checks:
                      phone_number_access:
                        passed: true
                        details:
                          verified_name: Demo Company
                          display_phone_number: +1 555-987-6543
                          quality_rating: GREEN
                          id: '998877665544332'
                      messaging_health:
                        passed: false
                        overall_status: BLOCKED
                        details:
                          can_send_message: BLOCKED
                          entities:
                            - entity_type: PHONE_NUMBER
                              id: '998877665544332'
                              can_send_message: LIMITED
                              additional_info:
                                - >-
                                  Your display name has not been approved yet.
                                  Your message limit will increase after the
                                  display name is approved.
                            - entity_type: WABA
                              id: '556677889900112'
                              can_send_message: BLOCKED
                              errors:
                                - error_code: 141006
                                  error_description: >-
                                    There is an error with the payment method.
                                    This will block business initiated
                                    conversations.
                                  possible_solution: >-
                                    There was an error with your payment method.
                                    Please add a new payment method to the
                                    account.
                            - entity_type: BUSINESS
                              id: '334455667788990'
                              can_send_message: LIMITED
                            - entity_type: APP
                              id: '112233445566778'
                              can_send_message: AVAILABLE
                      webhook_subscription:
                        passed: true
                        details:
                          app_id: 112233445566778
                          subscribed: true
                          subscribed_fields: null
                      webhook_verified:
                        passed: false
                        details:
                          verified_at: null
                          message: Webhook not yet verified by Meta
                    timestamp: '2024-01-20T16:45:15Z'
                unhealthy_invalid_token:
                  summary: Unhealthy - Invalid OAuth token
                  description: >
                    Shows when the access token is invalid or expired. All Meta
                    API checks fail.

                    User needs to reconnect their WhatsApp Business Account.
                  value:
                    status: unhealthy
                    checks:
                      phone_number_access:
                        passed: false
                        error: >-
                          Meta Graph API error: 400 - {"error" => {"message" =>
                          "Invalid OAuth access token - Cannot parse access
                          token", "type" => "OAuthException", "code" => 190,
                          "fbtrace_id" => "ABC123xyz456"}}
                      messaging_health:
                        passed: false
                        error: >-
                          Meta Graph API error: 400 - {"error" => {"message" =>
                          "Invalid OAuth access token - Cannot parse access
                          token", "type" => "OAuthException", "code" => 190,
                          "fbtrace_id" => "DEF789abc012"}}
                      webhook_subscription:
                        passed: false
                        error: >-
                          Meta Graph API error: 401 - {"error" => {"message" =>
                          "Invalid OAuth access token - Cannot parse access
                          token", "type" => "OAuthException", "code" => 190,
                          "fbtrace_id" => "GHI345def678"}}
                      webhook_verified:
                        passed: true
                        details:
                          verified_at: '2024-01-10T08:15:30.000Z'
                          message: >-
                            Webhook successfully verified at 2024-01-10 08:15:30
                            UTC
                    timestamp: '2024-01-20T18:22:45Z'
                error_response:
                  summary: Health check service error
                  value:
                    status: error
                    error: Service temporarily unavailable
                    timestamp: '2024-01-20T10:00:00Z'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: WhatsApp configuration not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          example: Resource not found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your project API key

````