{
  "openapi": "3.0.3",
  "info": {
    "title": "Onyx Tech Public & Agent API",
    "description": "Public machine-readable API and AI Agent endpoints for Onyx Tech software solutions and services.",
    "version": "1.0.0",
    "contact": {
      "name": "Onyx Tech Support",
      "url": "https://onyx-tech.net/contact",
      "email": "info@onyx-tech.net"
    }
  },
  "servers": [
    {
      "url": "https://onyx-tech.net",
      "description": "Production Server"
    }
  ],
  "paths": {
    "/api/company-info": {
      "get": {
        "summary": "Get Onyx Tech overview and contact info",
        "operationId": "getCompanyInfo",
        "responses": {
          "200": {
            "description": "Company profile information",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "data": { "type": "object" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/services": {
      "get": {
        "summary": "List all active services offered by Onyx Tech",
        "operationId": "getServices",
        "responses": {
          "200": {
            "description": "Array of services",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "data": {
                      "type": "array",
                      "items": { "type": "object" }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/products": {
      "get": {
        "summary": "List all products and SaaS systems (e.g. E-Skills)",
        "operationId": "getProducts",
        "responses": {
          "200": {
            "description": "Array of products",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "data": {
                      "type": "array",
                      "items": { "type": "object" }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/chatbot/message": {
      "post": {
        "summary": "Send query to Onyx Tech AI agent / Knowledge assistant",
        "operationId": "askChatbot",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["message"],
                "properties": {
                  "message": { "type": "string", "example": "What services do you offer?" },
                  "locale": { "type": "string", "enum": ["ar", "en"], "default": "en" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Chatbot response with optional action links",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "text": { "type": "string" },
                    "actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": { "type": "string" },
                          "url": { "type": "string" }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/contact": {
      "post": {
        "summary": "Submit contact or project inquiry",
        "operationId": "submitContactMessage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "message"],
                "properties": {
                  "name": { "type": "string" },
                  "email": { "type": "string", "format": "email" },
                  "phone": { "type": "string" },
                  "subject": { "type": "string" },
                  "message": { "type": "string" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message received confirmation"
          }
        }
      }
    }
  }
}
