openapi: 3.1.0
info:
  title: Conversational AI API
  description: 'Build AI-powered chatbots, automate conversations, and add web chat to your website.'
  license:
    name: Proprietary
    identifier: LicenseRef-CM.com-Proprietary
  version: '1.0'
servers:
  - url: 'https://api.cm.com'
    description: Production Server
paths:
  /conversational/v1/health:
    get:
      tags:
        - Health
      summary: Health check
      description: Verify that the Conversational AI API is reachable and your credentials are valid.
      operationId: conversational-ai-health-check
      responses:
        '200':
          description: Service is healthy.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    HealthResponse:
      title: Health Response
      description: Standard health check response
      required:
        - status
        - service
        - version
      properties:
        status:
          description: Service health status
          type: string
          example: ok
        service:
          description: Service name
          type: string
          example: conversational-ai
        version:
          description: API version
          type: string
          example: v1
      type: object
    ErrorResponse:
      title: Error Response
      description: Standard error response
      required:
        - message
      properties:
        message:
          description: Human-readable error message
          type: string
          example: Unauthorized
      type: object
  responses:
    UnauthorizedResponse:
      description: Unauthorized - invalid or missing credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      description: 'API authentication using Bearer tokens from your Conversational AI dashboard.'
      bearerFormat: 'API Token'
      scheme: bearer
tags:
  - name: Health
    description: Service health check endpoints
