{
  "openapi": "3.1.0",
  "info": {
    "title": "Dewany Public Discovery API",
    "version": "1.0.0",
    "description": "Read-only public product discovery and illustrative workflows for agents and developers. No authentication is required for these two public endpoints. This is not a customer workspace API, and it provides no credentials, private data, or action execution."
  },
  "servers": [
    {
      "url": "https://dewany.ai",
      "description": "Dewany public website"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Public discovery",
      "description": "Public descriptions only; no customer workspace access."
    }
  ],
  "paths": {
    "/api/v1/capabilities": {
      "description": "Read-only public JSON endpoint. Unsupported methods return 405; no request body or credentials are required.",
      "get": {
        "operationId": "getPublicCapabilities",
        "summary": "Describe public discovery capabilities",
        "description": "Public information only. Does not authenticate to, read, create, or change customer workspaces. Workflow examples are not executed. The server returns JSON; an incompatible Accept header returns 406.",
        "tags": [
          "Public discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Public discovery information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Capabilities"
                },
                "example": {
                  "name": "Dewany public discovery API",
                  "url": "https://dewany.ai",
                  "product": "AI company operating system",
                  "description": "Public product information and illustrative workflows. No customer workspace access or actions.",
                  "docsUrl": "https://dewany.ai/developers",
                  "openapiUrl": "https://dewany.ai/openapi.json",
                  "mcpUrl": "https://dewany.ai/api/mcp",
                  "workflowsUrl": "https://dewany.ai/api/v1/workflows",
                  "authentication": "none for this public discovery API",
                  "customerWorkspaceAccess": false
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "406": {
            "$ref": "#/components/responses/NotAcceptable"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/api/v1/workflows": {
      "description": "Read-only public JSON endpoint. Unsupported methods return 405; no request body or credentials are required.",
      "get": {
        "operationId": "listIllustrativeWorkflows",
        "summary": "List illustrative workflow starting points",
        "description": "Public information only. Does not authenticate to, read, create, or change customer workspaces. Workflow examples are not executed. The server returns JSON; an incompatible Accept header returns 406.",
        "tags": [
          "Public discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Public discovery information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workflows"
                },
                "example": {
                  "workflows": [
                    {
                      "id": "client-enquiry",
                      "title": "Win more clients",
                      "description": "Bring an enquiry, relevant company context, and the next owner together for review.",
                      "steps": [
                        "Understand the enquiry",
                        "Connect relevant client context",
                        "Prepare an opportunity brief for review",
                        "Assign the next follow-up"
                      ],
                      "illustrative": true
                    },
                    {
                      "id": "delivery-handoff",
                      "title": "Deliver work reliably",
                      "description": "Keep requests, owners, handoffs, and reviews visible around one outcome.",
                      "steps": [
                        "Understand the request",
                        "Agree the owner and plan",
                        "Connect handoffs",
                        "Review the outcome"
                      ],
                      "illustrative": true
                    },
                    {
                      "id": "knowledge-review",
                      "title": "Help expertise travel",
                      "description": "Review company guidance and connect approved knowledge to the work that needs it.",
                      "steps": [
                        "Gather relevant know-how",
                        "Review proposed guidance",
                        "Connect approved context",
                        "Keep guidance current"
                      ],
                      "illustrative": true
                    }
                  ]
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "406": {
            "$ref": "#/components/responses/NotAcceptable"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Capabilities": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "url",
          "product",
          "description",
          "docsUrl",
          "openapiUrl",
          "mcpUrl",
          "workflowsUrl",
          "authentication",
          "customerWorkspaceAccess"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "product": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Public product website."
          },
          "docsUrl": {
            "type": "string",
            "format": "uri",
            "description": "Documentation for this public discovery API."
          },
          "openapiUrl": {
            "type": "string",
            "format": "uri",
            "description": "This OpenAPI description."
          },
          "mcpUrl": {
            "type": "string",
            "format": "uri",
            "description": "Public discovery MCP endpoint, not a customer workspace connector."
          },
          "workflowsUrl": {
            "type": "string",
            "format": "uri",
            "description": "Illustrative workflow catalogue."
          },
          "authentication": {
            "type": "string",
            "const": "none for this public discovery API",
            "description": "These public discovery operations do not require an API key."
          },
          "customerWorkspaceAccess": {
            "type": "boolean",
            "enum": [
              false
            ],
            "description": "Always false. This API does not expose customer data, credentials, or workspace actions."
          }
        }
      },
      "Workflow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "description",
          "steps",
          "illustrative"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable public workflow identifier, not a customer record ID."
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "illustrative": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Always true. Describes an example, not an executable workflow or installed integration."
          }
        }
      },
      "Workflows": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "workflows"
        ],
        "properties": {
          "workflows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Workflow"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code",
              "message",
              "hint"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable machine-readable error identifier."
              },
              "message": {
                "type": "string",
                "description": "Readable error description without secrets."
              },
              "hint": {
                "type": "string",
                "description": "Suggested caller correction or next step."
              }
            }
          }
        }
      }
    },
    "responses": {
      "MethodNotAllowed": {
        "description": "The HTTP method is not supported. Use GET.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "method_not_allowed",
                "message": "Method not allowed.",
                "hint": "Use GET for this public discovery endpoint."
              }
            }
          }
        },
        "headers": {
          "Allow": {
            "description": "Methods accepted by this endpoint.",
            "schema": {
              "type": "string"
            },
            "example": "GET, HEAD, OPTIONS"
          }
        }
      },
      "NotAcceptable": {
        "description": "The requested response format is not supported.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "not_acceptable",
                "message": "This endpoint returns JSON.",
                "hint": "Send Accept: application/json or */*."
              }
            }
          }
        }
      },
      "InternalError": {
        "description": "Unexpected server error. No customer data is returned.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "internal_error",
                "message": "The discovery service could not complete this request.",
                "hint": "Retry later. Do not send credentials or private data."
              }
            }
          }
        }
      }
    }
  }
}
